05 2014 档案
摘要:D.E还是很难的。。。。。C不想多说什么。。。A:提意:给出每一组人的个数,以及一次车载容量,求出最少需要多少次才能载走所有的人。water:http://codeforces.com/contest/435/submission/6741997 B:提意:给出一个数,最多可以交换两个数k次,并且...
阅读全文
摘要:1/******************2byzhuyuqi*3QQ:1113865149*4name:2-sat*5*6******************/78usingnamespacestd;9constintMAX=1000;10intr[MAX],*rank;11intwa[MAX],w...
阅读全文
摘要:Given a prime p (p<108),you are to find min{x2+y2},where x and y belongs to positive integer, so that x2+y2=0 (mod p).打表可以看出结论: x=4k+3则没有平方和会等于P
阅读全文
摘要:Graphic SequenceA graphic sequence is a sequence of numbers which can be thedegree sequenceof somegraph. A sequence can be checked to determine if it ...
阅读全文
摘要:再此处学习看到了一个很好的结论:n个顶点的完全图有n^(n-2)个生成树。指数型母函数:用于排列关系中,例如:两个集合从一个集合中取k个另一个取n-k个。 成上系数:C(n,k);一般的母函数:比较简单了。。。相见国家队论文。。。。
阅读全文
摘要:Rank of TetrisProblem Description 自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为 了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜...
阅读全文
摘要:D. Prefixes and SuffixesYou have a string s = s1s2...s|s|, where |s| is the length of string s, and si its i-th character. Let's introduce several de...
阅读全文
摘要:while(scanf("%s",str+1)==1){intn=strlen(str+1);next[1]=0;intj=0;for(inti=2;i2#include3#include4#include5#include6#include7#include8usingnamespacestd;9...
阅读全文
摘要:早晨:下着小雨~~有不好的预感。。。来到场地先等半个小时进场感觉略逗比。好吧今天的代码手是曹神。本来今天不想敲代码的(一比赛脑子一片空白,经验太少)好吧,测试阶段,先敲完计算几何模板(肯定一般都能搞),万事具备了。坐等比赛开始。好吧:打开 题册,目测了一下a,b是水题。交给我了 A 1min 1Y....
阅读全文
摘要:今天是水题集啊。。。。A. Police Recruitstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe police departmen...
阅读全文
摘要:Iahub accidentally discovered a secret lab. He found there n devices ordered in a line, numbered from 1 to n from left to right. Each device i (1 ≤ i ...
阅读全文
摘要:题目描述Doyouknowgoagain?Iftheansweris“no”,well,youcanleaveNEUACM.GoagainisthemostperfectACMerinNEUACM,andhisteam’snameisNEU_FirstFinal.Besidesthis,goagai...
阅读全文
摘要:Problem XHuge ModInput:standard inputOutput:standard outputTime Limit:1 secondThe operator for exponentiation is different from the addition, subtract...
阅读全文