随笔分类 - codeforces
摘要:见这里http://ygdtc.sinaapp.com/?p=257
阅读全文
摘要:#includeusingnamespacestd;typedeflonglongLL;constintMAX=1e5+10;intmain(){LLn;while(cin>>n){if(n&1)coutusingnamespacestd;typedeflonglongLL;constintMAX=...
阅读全文
摘要:http://ygdtc.sinaapp.com/?p=241
阅读全文
摘要:http://ygdtc.sinaapp.com/?p=233
阅读全文
摘要:http://ygdtc.sinaapp.com/?p=210
阅读全文
摘要:http://ygdtc.sinaapp.com/?p=173
阅读全文
摘要:很牛逼的比赛:A:给出一个字符串 求出一共出现了多少个不同的字母。模拟:http://codeforces.com/contest/443/submission/6925981B:给出一个字符串求最长的连续重复两次的子串。暴力枚举起点和长度:http://codeforces.com/contest...
阅读全文
摘要:D.E还是很难的。。。。。C不想多说什么。。。A:提意:给出每一组人的个数,以及一次车载容量,求出最少需要多少次才能载走所有的人。water:http://codeforces.com/contest/435/submission/6741997 B:提意:给出一个数,最多可以交换两个数k次,并且...
阅读全文
摘要:今天是水题集啊。。。。A. Police Recruitstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe police departmen...
阅读全文
摘要:A. Eliminationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe finalists of the "Russian Code ...
阅读全文
摘要:没事扯淡再写篇题解吧!反正只会大众题目。A:题意:给出n个队列以及每个人付费所需要的时间求出用时最短的一条队列。sl:比较逗比(叙述这么长)的水体,5分钟1Y 。1#include2#include3#include4usingnamespacestd;5constintMAX=100+10;6constintinf=0x3f3f3f3f;7intk[MAX];8intmain()9{10intn;inta;intret,ans;11while(scanf("%d",&n)==1)12{13ret=0;ans=inf;14for(inti=0;i2#include3
阅读全文
摘要:A. Valera and Xtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputValera is a little boy. Yesterday he got a huge Math hometask at school, so Valera didn't have enough time to properly learn the English alphabet for his English lesson. Unfortunat
阅读全文
摘要:A. Nutstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou haveanuts and lots of boxes. The boxes have a wonderful feature: if you putx(x ≥ 0)divisors (the spacial bars that can divide a box) to it, you get a box, divided intox + 1sections.You are
阅读全文
摘要:A. Vanya and Cardstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVanya loves playing. He even has a special set of cards to play with. Each card has a single integer. The number on the card can be positive, negative and can even be equal to zero.
阅读全文
摘要:A. Inna and Choose Optionstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere always is something to choose from! And now, instead of "Noughts and Crosses", Inna choose a very unusual upgrade of this game. The rules of the game are giv
阅读全文
摘要:D. Counting Rectangles is Funtime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is ann × mrectangular grid, each cell of the grid contains a single integer: zero or one. Let's call the cell on thei-th row and thej-th column as(i, j).L
阅读全文
摘要:做codeforces以来题目最水的一次A题:Fox and Number Game题意:就是用一堆数字来回减,直到减到最小值为止,再把所有最小值加,求这个值sol: 简单数论题目,直接求所有数字的最大公约数即可ps: 以前cf出过这道题目啊,出题人没救了 5分钟300人过1#include2#include3#include4usingnamespacestd;5constintMAX=1000;6intnum[MAX];7intgcd(inta,intb)8{9returnb==0?a:gcd(b,a%b);10}11intmain()12{13intn;14while(scanf(&qu
阅读全文

浙公网安备 33010602011771号