摘要:
注意:所谓 n个数字都不相同 是指不同的数字正好是n个。 // 9'14" #include <iostream> #include <set> #include <iomanip> using namespace std; bool func(int i, int n) { set<int> se 阅读全文
posted @ 2024-08-01 21:42
Frodnx
阅读(11)
评论(0)
推荐(0)
摘要:
// 6'42" #include <iostream> using namespace std; int main() { int n; cin >> n; string tmp; getline(cin,tmp); char c1 = tmp[1]; string s; getline(cin, 阅读全文
posted @ 2024-08-01 21:28
Frodnx
阅读(10)
评论(0)
推荐(0)
摘要:
注意单位! #include <iostream> #include <cmath> using namespace std; int main() { int n; cin >> n; for(int i = 1; i <= n; ++ i) { int h, w; cin >> h >> w; 阅读全文
posted @ 2024-08-01 08:42
Frodnx
阅读(12)
评论(0)
推荐(0)
摘要:
// 11'52" #include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<pair<int,string>> qian; vector<pair<int,stri 阅读全文
posted @ 2024-08-01 08:33
Frodnx
阅读(7)
评论(0)
推荐(0)
摘要:
注意读题,心急吃不了热豆腐。 // 1'20" #include <iostream> #include <iomanip> using namespace std; int main() { int h; cin >> h; cout << fixed << setprecision(1) << 阅读全文
posted @ 2024-08-01 02:00
Frodnx
阅读(16)
评论(0)
推荐(0)
摘要:
直接背素数板子 // 1'58" #include <iostream> using namespace std; bool func(int n) { if(n <= 1) return false; if(n == 2) return true; for(int i = 2; i <= n / 阅读全文
posted @ 2024-08-01 01:57
Frodnx
阅读(13)
评论(0)
推荐(0)
摘要:
用哈希快速访问找到下标 // 8'33" #include <bits/stdc++.h> using namespace std; int arr[100]; int main() { map<int,int> hash; string s; cin >> s; for(auto c : s) a 阅读全文
posted @ 2024-08-01 01:54
Frodnx
阅读(7)
评论(0)
推荐(0)
摘要:
print("""I L o v e G P L T""") 阅读全文
posted @ 2024-08-01 01:41
Frodnx
阅读(13)
评论(0)
推荐(0)
摘要:
很史的一道题,没有ac的话建议混多半分直接跳。 读入最好使用getline,再用substr分割字符串。 // 15'00" #include <iostream> #include <string> using namespace std; int add(string a,string b) { 阅读全文
posted @ 2024-08-01 01:39
Frodnx
阅读(9)
评论(0)
推荐(0)
摘要:
// 1'17" #include <iostream> using namespace std; int main() { int n; cin >> n; n += 2; n %= 7; if(n == 0) n += 7; cout << n; return 0; } 阅读全文
posted @ 2024-08-01 01:15
Frodnx
阅读(12)
评论(0)
推荐(0)
摘要:
1e4直接暴力,能过就行不用优化。 // 5'50" #include <iostream> #include <map> using namespace std; int main() { string s; cin >> s; map<char,int> hash; for(auto c : s 阅读全文
posted @ 2024-08-01 01:12
Frodnx
阅读(25)
评论(0)
推荐(0)
摘要:
// 1'45" #include <iostream> using namespace std; int main() { int n; cin >> n; int cnt1 = 0, cnt2 = 0; while(n --) { int tmp; cin >> tmp; if(tmp % 2 阅读全文
posted @ 2024-08-01 01:04
Frodnx
阅读(10)
评论(0)
推荐(0)
浙公网安备 33010602011771号