07 2024 档案
摘要:for i in range(3): print("I'm gonna WIN!")
阅读全文
摘要:有前导零,末尾不能有空格,会卡格式 // 17'05" #include <bits/stdc++.h> using namespace std; int main() { map<string,bool> hash; int n; cin >> n; for(int i = 1; i <= n;
阅读全文
摘要:还是注意读题,同输不喝酒 // 10'38" #include<bits/stdc++.h> using namespace std; int main() { int jia, yi; cin >> jia >> yi; int n; cin >> n; int j1 = 0, y1 = 0; f
阅读全文
摘要:// 5'19" #include <iostream> using namespace std; int main() { int a, b; char c; cin >> a >> c >> b; if(a < 12 || a == 12 && b == 0) { cout << "Only "
阅读全文
摘要:// 7'00" #include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; double d1 = 1, d2 = 1; if(s[0] == '-') d1 = 1.5; if((s[s.size(
阅读全文
摘要:小错不断,简直灾难 // 14'52" #include <bits/stdc++.h> using namespace std; #define int long long int arr[17] = {7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2}; signed ma
阅读全文
摘要:注意格式 // 2'25" #include <iostream> using namespace std; int main() { int n; char c; cin >> n >> c; for(int j = 1; j <= (n + 1)/ 2; ++ j) { for(int i =
阅读全文
摘要:print("This is a simple problem.")
阅读全文
摘要:水题 // 1'43" #include <iostream> using namespace std; int main() { int n; cin >> n; int sum = 0; for(int i = 1; i <= n; ++ i) { int cnt = 1; for(int j
阅读全文
摘要:注意输出格式 // 1'10" #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << "2^" << n << " = " << pow(2,n); return 0; }
阅读全文
摘要:数组模拟哈希 // 2'00" #include <iostream> using namespace std; int arr[1000]; int main() { string s, d; getline(cin,s); getline(cin,d); for(auto c : d) arr[
阅读全文
摘要:水题 // 1'16" #include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if(a > b) swap(a, b); if(b > c) swap(b, c); if(a >
阅读全文
摘要:不开long long见祖宗 // 15'22" #include <iostream> using namespace std; #define int long long class fru { public: int fz; int fm; fru(int x = 0, int y = 1):
阅读全文
摘要:考察格式 printf("%5d",i); // 5'43" #include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; int sum = 0; int cnt = 1; for(int i = a;
阅读全文
摘要:注意格式,最后要求不带空格 // 4'18" #include <iostream> using namespace std; int main() { string s; cin >> s; for(int i = 0; i < s.size(); ++ i) { if(s[i] =='-') c
阅读全文
摘要:暴力即可,考虑从2到sqrt(n)作为连续因子里的最小因子。 // 5'10" #include <iostream> using namespace std; int main() { int n; cin >> n; int res = 1; int num = n; for(int i = 2
阅读全文
摘要:map存取数据 // 4'57" #include <iostream> #include <map> using namespace std; #define int long long #define x first #define y second signed main() { map<in
阅读全文
摘要:注意取整 // 1'22" #include <iostream> using namespace std; int main() { double f; cin >> f; cout << "Celsius = " << (int)(5 * (f - 32.0) / 9) << endl; ret
阅读全文
摘要:数组模拟哈希 // 1'43" #include <iostream> using namespace std; int arr[100]; int main() { string s; cin >> s; for(auto c : s) arr[c - '0'] ++; for(int i = 0
阅读全文
摘要:重点找递推公式,推导层数 // 8'39" #include <iostream> #include <cmath> using namespace std; int main() { int n; cin >> n; char c; cin >> c; int cur = 1; for(int i
阅读全文
摘要:直接输出的题还是python快 print("Hello World!") // 30" #include <iostream> using namespace std; int main() { cout << "Hello World!"; return 0; }
阅读全文
摘要:string 容器 // string容器 // 基本操作 string str(4,'c'); // 使用 4 个字符 c 初始化 str2.assign(str1, 2, 1); // 将 str1 从 下标2 开始,将 1 个字符赋值给字符串 str2 = str1.substr(2, 1)
阅读全文