B. Simple Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output One day Misha and Andrew were playing a very simple game. First, each player chooses an integer in the range from 1 to n. Let'…
B. Vanya and Books time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vanya got an important task - he should enumerate books in the library and label each book with its number. Each of the n …
B. Case of Fake Numbers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Andrewid the Android is a galaxy-famous detective. He is now investigating a case of frauds who make fake copies of…
题目地址 先简单的总结一下这次CF,前两道题非常的水,可是第一题又是因为自己想的不够周到而被Hack了一次(或许也应该感谢这个hack我的人,使我没有最后在赛后测试中WA).做到C题时看到题目情况非常复杂,明显超出自己现在水平,卡了很久也没有好好做题.等了很长时间才开始看D题,而这时信心已经严重不足.赛后再看D题才发现自己比赛时理解错了题意,致使误以为题目非常复杂.而实际上,这个过程分析起来是非常容易的. 对于三种棱长度分别为a,b,c的石头,r最大为min(a,b,c)/2;. 如果两个石头要…
这场比赛的出题人挺有意思,全部magic成了青色. 还有题目中的图片特别有趣. 晚上没打,开virtual contest打的,就会前三道,我太菜了. 最后看着题解补了第四道. 比赛传送门 A. Angry Students 题目大意:有t队学生,每个学生有两种状态,生气(A)或不生气(P).(话说为什么生气的戴着圣诞帽哇)所有生气的人都会往前一个人丢雪球,被丢到的人也会变得生气,也会丢雪球.问你每队人中最后一个学生变得生气的时刻. 这题就是统计最长的连续的'P'当然前提是左边有生气的人. 代码…
题目网址:http://codeforces.com/contest/1154/problem/ 题目意思:就是给你四个数,这四个数是a+b,a+c,b+c,a+b+c,次序未知要反求出a,b,c,d 题解:显然先求出这四个数中的最大数,然后分别减去其他三个数,即得a,b,c. #include<bits/stdc++.h> using namespace std; ]; int main() { ;i<=;i++) cin>>a[i]; sort(a+,a++); prin…
Codeforces Round #713 (Div. 3) Editorial 记录一下自己写的前二题本人比较菜 A. Spy Detected! You are given an array a consisting of n (n≥3) positive integers. It is known that in this array, all the numbers except one are the same (for example, in the array [4,11,4,4]…
D. Dynamic Problem Scoring time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya and Petya take part in a Codeforces round. The round lasts for two hours and contains five problems. For th…
思路:把n分成[1,n/2],[n/2+1,n],假设m在左区间.a=m+1,假设m在右区间,a=m-1.可是我居然忘了处理1,1这个特殊数据.被人hack了. 总结:下次一定要注意了,提交前一定要看下边界数据,不要急着交. 题目链接:http://codeforces.com/problemset/problem/570/B <pre name="code" class="cpp">#include<bits/stdc++.h> using…
题目:Click here #include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 0x3f3f3f3f; +; int n, m; int main() { while( ~scanf("%d %d", &n, &m ) ) { ) { printf("1\n"); continue; } ) printf( ); else…