Codeforces Round 832 (Div2)】的更多相关文章

A. Launch of Collider time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There will be a launch of a new, powerful and unusual collider very soon, which located along a straight line. n parti…
Codeforces Round #539 div2 abstract I 离散化三连 sort(pos.begin(), pos.end()); pos.erase(unique(pos.begin(), pos.end()), pos.end());if (pos.size() == 0) pos.push_back(0);int id = lower_bound (pos.begin(), pos.end(), q[i].time) - pos.begin(); II java输入输出带模…
[第3站]Codeforces Round #512 Div2 第三题莫名卡半天……一堆细节没处理,改一个发现还有一个……然后就炸了,罚了一啪啦时间 Rating又掉了……但是没什么,比上一次好多了:) +传送门+ ◇ 简单总结 前两道题非常OK,秒掉还好.心态爆炸是从第三题开始的……一开始设计的判断方法没有考虑0,然后就错了很多次,然后改了过后又没有考虑整个数要分成2个及以上的数,继续WA,最后整个程序删了重新魔改了一次终于AC.感觉最后的AC代码的复杂度要比原来高一些,但是毕竟AC了,还是不…
Codeforces Round#320 Div2 先做个标题党,骗骗访问量,结束后再来写咯. codeforces 579A Raising Bacteria codeforces 579B Finding Team Member codeforces 579C A Problem about Polyline codeforces 579D "Or" Game codeforces 579E Weakness and Poorness codeforces 579F LCS Aga…
Codeforces Round #564(div2) 本来以为是送分场,结果成了送命场. 菜是原罪 A SB题,上来读不懂题就交WA了一发,代码就不粘了 B 简单构造 很明显,\(n*n\)的矩阵可以按照这个顺序排列 然后根据\(n\)的大小搞一搞就好了 #include<cstdio> #include<cctype> #include<cstring> #include<algorithm> #include<iostream> #incl…
ProblemA(Codeforces Round 689A): 题意: 给一个手势, 问这个手势是否是唯一. 思路: 暴力, 模拟将这个手势上下左右移动一次看是否还在键盘上即可. 代码: #include <cmath> #include <cstdio> #include <cstring> #include <cstdlib> #include <ctime> #include <set> #include <map>…
Cdoeforces 572(Div2)A.B.C.D1.D2.E 传送门:https://codeforces.com/contest/1189 A.题意: 给你一串长为n的字符串,要求你将其切割为若干个good 的子串,一个子串如果其中0和1的个数不相等,那么这个子串是good子串,输出最少切割后的子串个数和切割后的结果 题解: 最多只用切1次,因为一个串中0和1的个数只有相等和不相等两种情况,如果串中0和1的个数不相等那么就不用切割,否则随便拿头或者拿尾即可 代码: #include <s…
比赛链接: Codeforces Round #626 (Div. 2, based on Moscow Open Olympiad in Informatics) D.Present 题意: 给定大小为$n$的a数组,求下面式子的结果: $$ (a_1 + a_2) \oplus (a_1 + a_3) \oplus \ldots \oplus (a_1 + a_n) \\ \oplus (a_2 + a_3) \oplus \ldots \oplus (a_2 + a_n) \\ \ldot…
题目传送门:http://codeforces.com/contest/957/problem/D 题意大致是这样的:有一个水池,每天都有一个水位(一个整数).每天都会在这一天的水位上划线(如果这个水位已经被划线了,那么不划线). 现在告诉你每天能看见的线条mi(就是高于水面的,刚好在水面的不算),设di为第i天水面以下的线条数(刚好在水面的不算),求(d1+d2+d3....dn)的最小值. 解析: 我们设第i天有ki条水位线,容易得到: 移项后,将d留在右边,我们发现mi和n都是固定的,所以…
题目链接:https://codeforces.com/contest/1323/problem/D 题意:给了大小为4e5的数组a,其中1<=ai<=1e7.求所有点对和的异或和,即: 思路: 按位来考虑,因为两个元素的和<=2e7,而2e7小于225,因此结果最多是25位.我们考虑答案中每一位ans[k]的值(0<=k<=24). 显然,ai中仅有0-k位会对第k位有影响,因此对数组a全部对2k+1取模,得到数组b,对b按升序排序. 这样,0<=bi<=2k+…