Codeforces Round #563 (Div. 2) 划水记】的更多相关文章

网太卡只好做划水选手,只做EF. E 很容易发现第一个数是2k或者是3*2k-1,因为消去因子次数要尽可能多,然后可以直接dp一发转移还剩几个2/3即可,写起来有些麻烦 #include<bits/stdc++.h> using namespace std; ,mod=1e9+; ][],f[N][][]; int count(int x) { ; ==)ret++,x/=; return ret; } int main() { scanf("%d",&n); ){…
Codeforces Round #563 (Div. 2)/CF1174 CF1174A Ehab Fails to Be Thanos 其实就是要\(\sum\limits_{i=1}^n a_i\)与\(\sum\limits_{n+1}^{2n}a_i\)差值最大,排一下序就好了 CF1174B Ehab Is an Odd Person 一个显然的结论就是如果至少有一个奇数和一个偶数,那么是可以随意调整的,也就是升序排序 否则不可以进行任何操作 code CF1174C Ehab an…
昨天晚上(今天凌晨),又忍不住去打CF.(本蒟弱到只能打Div.2)... 我觉得我可以用一个词概括我这次的CF: 呵呵 刚一开赛,我就codeforces访问失败.. 后来好不容易能上了,两三分钟才能加载完一个网页. 磨蹭到我打开题目界面,已经过去了7min了!! 这还不是重点. 等我看到题目的时候,WOC!!!!这是啥???俄文???? 我找google translate,翻译成中文,,什么玩意??根本读不通!! 翻译成英文!啥?? 2 3你给我翻译成March 3??靠不靠谱?? 后来我…
A:签到 #include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; int read() { ,f=;char c=getchar(); ;c=getchar();} )+(x<<)+(c^),c=getchar(); ret…
好长时间没有打Codeforces了,今天被ysf拉过去打了一场. lrd也来参(nian)加(ya)比(zhong)赛(sheng) Problem A: 我去,这不SB题吗.. 用桶统计一下每个数出现的数目. 对位相减然后除二加起来 最后除二输出就行了. 具体为什么我也没想,直觉告诉我这么做就可以了. 然后他就pretest passed了 Problem B: for循环到k扫一遍就行了吧. 立马写了个上去 Wrong answer on pretest 2 没开long long !!!…
链接:https://codeforces.com/contest/1174/problem/C 题意: You're given an integer nn. For every integer ii from 22 to nn, assign a positive integer aiai such that the following conditions hold: For any pair of integers (i,j)(i,j), if ii and jj are coprime…
链接:https://codeforces.com/contest/1174/problem/B 题意: You're given an array aa of length nn. You can perform the following operation on it as many times as you want: Pick two integers ii and jj (1≤i,j≤n)(1≤i,j≤n) such that ai+ajai+aj is odd, then swap…
链接:https://codeforces.com/contest/1174/problem/A 题意: You're given an array aa of length 2n2n. Is it possible to reorder it in such way so that the sum of the first nn elements isn't equal to the sum of the last nn elements? 思路: 排序后求前一半和后一半的和比较. 代码: #…
C. Ehab and a Special Coloring Problem 题目链接:http://codeforces.com/contest/1174/problem/C 题目 You're given an integer n. For every integer i from 2 to n, assign a positive integer ai such that the following conditions hold: For any pair of integers (i,…
B.Ehab Is an Odd Person 题目链接:http://codeforces.com/contest/1174/problem/B 题目 You’re given an array a of length n. You can perform the following operation on it as many times as you want: Pick two integers i and j (1≤i,j≤n) such that ai+aj is odd, the…