上一页 1 2 3 4 5 6 7 8 ··· 13 下一页
摘要: 想得太复杂,这道题不会卡你人数为0时候的情况,不要忘记题目的条件:不允许单人住一间寝室 // 32'41" #include <bits/stdc++.h> using namespace std; map<int,bool> div(int x) { map<int,bool> hash; if( 阅读全文
posted @ 2024-08-24 01:29 Frodnx 阅读(57) 评论(0) 推荐(0)
摘要: // 6'11" #include <bits/stdc++.h> using namespace std; const int N = 110; int a[N]; int main() { int n; cin >> n; for(int i = 1; i <= n; ++ i) cin >> 阅读全文
posted @ 2024-08-23 02:20 Frodnx 阅读(74) 评论(0) 推荐(0)
摘要: // 1'58" #include <iostream> using namespace std; int main() { int n; cin >> n; for(int i = 1; i <= n; ++ i) { int a, b, c; cin >> a >> b >> c; if(c = 阅读全文
posted @ 2024-08-23 02:08 Frodnx 阅读(33) 评论(0) 推荐(0)
摘要: // 2'35" #include <iostream> using namespace std; int main() { int n, m, k; string x; cin >> n >> x >> m >> k; if(k == n) cout << "mei you mai " << x 阅读全文
posted @ 2024-08-23 02:05 Frodnx 阅读(37) 评论(0) 推荐(0)
摘要: // 1'18" #include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; int s = a + b; cout << s - 16 << endl << s - 3 << endl << s - 阅读全文
posted @ 2024-08-21 01:11 Frodnx 阅读(27) 评论(0) 推荐(0)
摘要: print("Good code is its own best documentation.") 阅读全文
posted @ 2024-08-21 01:09 Frodnx 阅读(19) 评论(0) 推荐(0)
摘要: 注意有大坑:题目没有说,如果同一个书号出现两个'S',按照后者记时(一本书在未归还时被多次借出,记录取后者)。 // long #include <bits/stdc++.h> using namespace std; #define x first #define y second int mai 阅读全文
posted @ 2024-08-21 01:08 Frodnx 阅读(13) 评论(0) 推荐(0)
摘要: 题目描述弯弯绕绕,总结如下:天梯赛分数不够的直接不要,PAT面试分数够s的直接要,剩余人分数相同的只要k个。 // 13'55" #include <bits/stdc++.h> using namespace std; int main() { int n, k, s; cin >> n >> k 阅读全文
posted @ 2024-08-20 21:48 Frodnx 阅读(43) 评论(0) 推荐(0)
摘要: 无论技能释放在哪一行,并不影响剩余格子数量,只需统计出现了多少不同的行和列 #include <bits/stdc++.h> using namespace std; int main() { int n, m, q; cin >> n >> m >> q; map<int,bool> hash1, 阅读全文
posted @ 2024-08-20 21:31 Frodnx 阅读(33) 评论(0) 推荐(0)
摘要: // 4'34" #include <bits/stdc++.h> using namespace std; string func(string s) { string res; for(int i = 1; i < s.size(); ++ i) if((s[i] - '0') % 2 == ( 阅读全文
posted @ 2024-08-20 16:02 Frodnx 阅读(28) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 13 下一页