摘要: B.分赃 首先统计只有一个的数字个数,如果是偶数就平均分给两个人,然后把剩下的数字全部分给任意一个人。 如果是奇数个,就看时候有数字的数量大于三,如果有,就把这个数字的其中一个分给少的人,然后把剩下所有的数字分给另一个人。 #include<bits/stdc++.h> using namespac 阅读全文
posted @ 2023-01-08 15:16 PHarr 阅读(30) 评论(0) 推荐(0) 编辑
摘要: A. 最大数量 签到,用了结构化绑定 #include<bits/stdc++.h> #define int long long using namespace std; int read(){...} int32_t main(){ int n = read(); map<pair<int,int 阅读全文
posted @ 2023-01-08 15:13 PHarr 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 中文题面 中文题解 A. Koxia and Whiteboards 因为必须要对$a_i$做替换,那么把$a_i$中最小的替换掉是最优的 #include<bits/stdc++.h> #define int long long using namespace std; int read(){ i 阅读全文
posted @ 2023-01-08 15:11 PHarr 阅读(26) 评论(0) 推荐(0) 编辑
摘要: A.小杜要迟到了! #include <bits/stdc++.h> #define int long long using namespace std; int32_t main(){ int n , k , a , b , r1 , r2; cin >> n >> k >> a >> b; n 阅读全文
posted @ 2023-01-08 15:09 PHarr 阅读(35) 评论(0) 推荐(0) 编辑
摘要: G. The Witchwood 签到 #include <bits/stdc++.h> #define int long long using namespace std; int read(){ int x = 0 , ch = getchar(); while( ch < '0' || ch 阅读全文
posted @ 2023-01-08 15:06 PHarr 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 马尼拉区域赛题目出得还是不错的,只是感觉大多数参赛队伍的水平不太行,我们这样的队伍居然能苟到铜牌 A. An Easy Calculus Problem 签到 #include <bits/stdc++.h> #define int long long using namespace std; co 阅读全文
posted @ 2023-01-08 15:04 PHarr 阅读(113) 评论(0) 推荐(0) 编辑
摘要: A. Cowardly Rooks 在$n\times n$的棋盘中有 m 个车,问是否可以在移动任意一个棋子一步后是的m个车不能相互攻击 如果m>n无论如何都会冲突 首先要统计冲突的数量 如果没有冲突的话,如果n==m则移动后一定会导致冲突,反之一定可以 如果只有一个冲突,就一定可以把冲突解决 如 阅读全文
posted @ 2023-01-08 15:01 PHarr 阅读(12) 评论(0) 推荐(0) 编辑