Codeforces Round #443 (Div. 2) codeforces 879 A. Borya's Diagnosis[水题] #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int main(){ , s, d; scanf("%d", &n); while(n--) { scanf("%d%d", &a…
Codeforces Round #434 (Div. 2) codeforces 858A. k-rounding[水] 题意:已知n和k,求n的最小倍数x,要求x后缀至少有k个0. 题解:答案就是10^k和n的最小公倍数. #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> using namespace std; typedef long long ll; ll…
Codeforces Round #441 (Div. 2) codeforces 876 A. Trip For Meal(水题) 题意:R.O.E三点互连,给出任意两点间距离,你在R点,每次只能去相邻点,要走过n个点,求走过的最短距离. #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int main() { int n, a, b, c; scanf("…
Codeforces Round #436 (Div. 2) 敲出一身冷汗...感觉自己宛如智障:( codeforces 864 A. Fair Game[水] 题意:已知n为偶数,有n张卡片,每张卡片上都写有一个数,两个人每人选一个数,每人可以拿的卡片必须写有是自己选的数,问能否选择两个数使得两个人每人拿的卡片数一样多并且能拿光卡片.[就是看输入是不是只有两种数字] //:第一遍我看成字符串包含有选的数字也能拿,,这样写着居然过了..水题水题.. #include<cstdio> #inc…
//在我对着D题发呆的时候,柴神秒掉了D题并说:这个D感觉比C题简单呀!,,我:[哭.jpg](逃 Codeforces Round #435 (Div. 2) codeforces 862 A. Mahmoud and Ehab and the MEX[水] 题意:定义一个集合的MEX为其中的最小的不在集合里的非负整数,现在给一个大小为N的集合和X,每次操作可以向其中加入一个非负整数或删除一个数,问最小的操作次数,使得这个集合的MEX为X. #include<cstdio> #include…
Codeforces Round #440 (Div. 2) codeforces 870 A. Search for Pretty Integers(水题) 题意:给两个数组,求一个最小的数包含两个数组各至少一个数. #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n, m; ], b[]; int main() { , y = , s = ; scanf(…
Codeforces Round #439 (Div. 2) codeforces 869 A. The Artful Expedient 看不透( #include<cstdio> int main(){ puts("Karen"); ; } 15ms codeforces 869B. The Eternal Immortality(数学,水) 题意:输出两个数的阶乘的商的 个位数 题解:两数之差大于5,个位数就是0.小于5直接个位相乘即可. #include<cs…
A:考虑每一位的改变情况,分为强制变为1.强制变为0.不变.反转四种,得到这个之后and一发or一发xor一发就行了. #include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; #define ll long long #define N…
[感谢牛老板对D题的指点OTZ] codeforces 842 A. Kirill And The Game[暴力] 给定a的范围[l,r],b的范围[x,y],问是否存在a/b等于k.直接暴力判断即可. #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> using namespace std; typede…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 模拟 [代码] #include <bits/stdc++.h> using namespace std; const int N = 1000; int n; pair <int,int> a[N+10]; int main(){ // freopen("rush.txt","r",stdin); scanf("%d",&n); for (int…