Codefoces
R_emembers
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #673 (Div. 2)
Codeforces Round #673 (Div. 2) 传送门 A. Copy-paste 题解 贪心,最小的一个个往后加。 代码 #include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <cstring> #define ll long long using namespace std; int a[1005]; int m原创 2020-09-28 22:30:10 · 92 阅读 · 0 评论 -
Codeforces Round #658 (Div. 2)
Codeforces Round #658 (Div. 2) A. Common Subsequence 题意: 找两个字符串最短的公共子序列 题解: 用桶排序记录有是否出现过,出现过就输出 代码: #include <iostream> #include <cstring> using namespace std; int a[1005]; int b[1005]; int num[1005]; int main() { int t, n, m; cin >>原创 2020-07-27 10:40:09 · 97 阅读 · 0 评论 -
Codeforces Round #656 (Div. 3)
Codeforces Round #656 (Div. 3) A. Three Pairwise Maximums 题意:对于每组测试样例给出三个数x y z,你需要寻找三个数a, b, c使得x = max(a,b) y = max(a,c) z = max(b,c) 如果能找到则输出YES按任意顺序打印abc 题解:因为z是a、b和c三个整数中的最大值,并且它以两对出现(因此它在x、y和z中最多出现两次)。否则,答案就存在了,它可以是x,x和z, 代码: #include <iostream>原创 2020-07-20 20:17:33 · 106 阅读 · 0 评论 -
Codeforces Round #646 (Div. 2)
Codeforces Round #646 (Div. 2) 题目链接:Codeforces Round #646 (Div. 2) A. Odd Selection 代码 #include<iostream> using namespace std; int main() { int t; cin >> t; while (t--) { int n, x, a, sum = 0, Odd = 0, Oeve = 0; cin原创 2020-06-02 20:47:22 · 165 阅读 · 0 评论 -
Codeforces Round #644 (Div. 3)
Codeforces Round #644 (Div. 3) 比赛链接 :Codeforces Round #644 (Div. 3) A. Minimal Square 题意:找出 a*b 正方形最小的面积 题解:比较边的(a2,b)或(a,b2)的长短 代码: #include <iostream> using namespace std; int main() { int t, n, m; cin >> t; while(t--) { cin >> n原创 2020-05-26 21:00:15 · 145 阅读 · 0 评论 -
E. Special Elements(cf#640)
E. Special Elements 题意 给定元素个数<=8000且元素大小<=8000的数组,问其中可表示为连续子序列的和的元素有多少个 题解 求出所有子序列和然后再匹配元素,和大于8000就不需要了 #include <iostream> #include<cstring> using namespace std; int visit[8100]; //用桶数组来装所有的子序列和 int a[8100]; int b[8100]; int main() {原创 2020-05-23 21:11:32 · 189 阅读 · 0 评论