D. Jzzhu and Cities time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Jzzhu is the president of country A. There are n cities numbered from 1 to n in his country. City 1 is the capital of A.…
E. Jzzhu and Apples time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Jzzhu has picked n apples from his big apple tree. All the apples are numbered from 1 to n. Now he wants to sell them to…
A. Jzzhu and Children time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There are n children in Jzzhu's school. Jzzhu is going to give some candies to them. Let's number all the children from…
B. Jzzhu and Sequences time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Jzzhu has invented a kind of sequences, they meet the following property: You are given x and y, please calculate fn m…
今天老师(orz sansirowaltz)让我们做了很久之前的一场Codeforces Round #257 (Div. 1),这里给出A~C的题解,对应DIV2的C~E. A.Jzzhu and Chocolate time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Jzzhu has a big rectangular cho…
题目地址 先简单的总结一下这次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'当然前提是左边有生气的人. 代码…
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]…
题目网址: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…
题目链接:http://codeforces.com/problemset/problem/450/B B. Jzzhu and Sequences time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Jzzhu has invented a kind of sequences, they meet the following pr…