摘要:
Doing Homework againTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4039Accepted Submission(s): 2335Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline 阅读全文
摘要:
Moving TablesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13571Accepted Submission(s): 4656Problem DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure.The floor has 阅读全文
摘要:
简单的加减法Time Limit:1 SecMemory Limit:128 MBSubmit:8Solved:3[Submit][Status][Discuss]Descriptionbs神的数学太牛了,他经常想一些极难极坑爹数学问题作弄同学,这不愚人节快到了,他又有坏点子了。我们都知道对于式子@1@2@3.....n-1@n,如果要求用'+'或'-'来代替@,那么最终肯定能得到一个整数T,使@1@2@3.....n-1@n=T,这是相当简单的。但是bs神太坏了,现在给你整数T,让你求出最小的n,使@1@2@3.....n-1@n=T成立(@依然用'+ 阅读全文
摘要:
今年暑假不ACTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18610Accepted Submission(s): 9680Problem Description“今年暑假不AC?”“是的。”“那你干什么呢?”“看世界杯呀,笨蛋!”“@#$%^&*%...”确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比 阅读全文
摘要:
Football MatchTime Limit:2 Seconds Memory Limit:32768 KBToday football has become the most popular sport all over the world. Many countries have their own football league matches. And the FIFA wants to hold a great league match which could contains all the clubs throughout the world. It is difficult 阅读全文
摘要:
EdgeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1129Accepted Submission(s): 742Problem DescriptionFor products that are wrapped in small packings it is necessary that the sheet of paper containing the directions for use is folded until its size 阅读全文
摘要:
问题描述:大部分的正整数可以表示为2个以上连续整数之和。如6=1+2+3,9=4+5=2+3+4.你的任务是求出给定正整数可以表示为多少个2个以上连续整数之和。思路:令输入的数为n,i=1,j=i+i,sum=∑(i,j),m=n/2+1;在3个之中循环。直到不满足条件为止。 条件:i<=j && j<m;1.若sum<n,说明和不够,则令j加1,sum=sum+j,假如之前有2个数字相加,那么现在变为了3个数字相加。2.若sum>n,说明和超了,则 让sum=sum-i,假如之前有4个数字相加,那么现在变为了3个数字相加。然后使得i+13.若sum=n 阅读全文
摘要:
如果一个字符串可以由某个长度为k的字符串重复多次得到,我们说该串以k为周期。例如,abcabcabc以3为周期(注意,它也以6和12为周期)。输入一个长度不超过80的串,输出它的最小周期。样例输入:HoHoHo样例输出:2代码如下:View Code 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 using namespace std; 5 int main() 6 { 7 char word[100]; 8 scanf("%s",word); 9 int 阅读全文
摘要:
EncodingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18521Accepted Submission(s): 7973Problem DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method:1. Each sub-string containing k same 阅读全文
摘要:
Fibonacci AgainTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25156Accepted Submission(s): 12182Problem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).InputInput consists of a sequence 阅读全文