摘要:
Description 小闪最近迷上了二刀流——不过他耍的其实是剑——新买了一个宝库用来专门存放自己收集的双剑。一对剑有两把,分只能左手用的和只能右手用的,各自有一个攻击力数值。虽然一对剑在小闪刚拿到时是一对,不过其实可以认为它们是独立的两把剑。一对剑的攻击力是左右两把剑的攻击力之和,小闪可以自由地 阅读全文
摘要:
The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral p... 阅读全文
摘要:
In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several cons... 阅读全文
摘要:
Chinese always have the railway tickets problem because of its' huge amount of passangers and stations. Now goverment need you to deve... 阅读全文
摘要:
C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚... 阅读全文
摘要:
You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given numbe... 阅读全文
摘要:
很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文... 阅读全文
摘要:
Problem DescriptionIn the modern time, Search engine came into the life of everybody like Google, Baidu, etc.Wiskey also wants to brin... 阅读全文
摘要:
Neal is very curious about combinatorial problems, and now here comes a problem about words. Knowingthat Ray has a photographic memory... 阅读全文
摘要:
int trie[1000010][26]; int num[1000010]={0}; int pos = 1;void Insert(char *s) { int i; int c = 0; for(i=0;i<strlen(s);i... 阅读全文
摘要:
Description A template for an artwork is a white grid of n × m squares. The artwork will be created by painting q horizontal and vertical black stroke 阅读全文
摘要:
欧拉函数: 定义和简单性质 欧拉函数在OI中是个非常重要的东西,不知道的话会吃大亏的. 欧拉函数用希腊字母φ表示,φ(N)表示N的欧拉函数. 对φ(N)的值,我们可以通俗地理解为小于N且与N互质的数的个数(包含1). 欧拉函数的一些性质: 1.对于素数p, φ(p)=p-1,对于对两个素数p,q φ 阅读全文
摘要:
欧拉函数: 定义和简单性质 欧拉函数在OI中是个非常重要的东西,不知道的话会吃大亏的. 欧拉函数用希腊字母φ表示,φ(N)表示N的欧拉函数. 对φ(N)的值,我们可以通俗地理解为小于N且与N互质的数的个数(包含1). 欧拉函数的一些性质: 1.对于素数p, φ(p)=p-1,对于对两个素数p,q φ 阅读全文
摘要:
DescriptionEverybody loves big numbers (if you do not, you might want to stop reading at this point). There are many ways of construct... 阅读全文
摘要:
DescriptionA tremendously exciting raffle is being held, with some tremendously exciting prizes being given out. All you have to do to... 阅读全文
摘要:
Number SequenceTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 34658 Accep... 阅读全文
摘要:
Power stringTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 54809 Accepted: 22806DescriptionGiven two strings a and b we def... 阅读全文
摘要:
DescriptionThe little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names... 阅读全文
摘要:
void GetFail(char *P,int *Next){ int len = strlen(P); Next[0]= 0,Next[1]=0; for(int i=1;i<len;i++) { int j=Next[i]; while(j && P[... 阅读全文
摘要:
Benny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are ... 阅读全文
摘要:
Problem DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income... 阅读全文
摘要:
Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某... 阅读全文
摘要:
The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room 阅读全文
摘要:
Background Mr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move knights from one position to another s... 阅读全文
摘要:
The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of 阅读全文