随笔分类 -  ACM

摘要:The Pilots Brothers' refrigeratorTime Limit:1000MSMemory Limit:65536KTotal Submissions:16008Accepted:6035Special JudgeDescriptionThe game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 handles on the refrigerator door. Ev 阅读全文
posted @ 2013-09-28 22:03 dancingrain 阅读(157) 评论(0) 推荐(0)
摘要:Flip GameTime Limit:1000MSMemory Limit:65536KTotal Submissions:26203Accepted:11308DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying either it's black 阅读全文
posted @ 2013-09-28 17:07 dancingrain 阅读(249) 评论(0) 推荐(0)
摘要:Rightmost DigitTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 26061Accepted Submission(s): 10018Problem DescriptionGiven a positive integer N, you should output the most right digit of N^N.InputThe input contains several test cases. The first line 阅读全文
posted @ 2013-09-28 11:38 dancingrain 阅读(258) 评论(0) 推荐(0)
摘要:Humble NumbersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13689Accepted Submission(s): 5956Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16 阅读全文
posted @ 2013-09-27 21:42 dancingrain 阅读(247) 评论(0) 推荐(0)
摘要:The Hardest Problem EverTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13447Accepted Submission(s): 6123Problem DescriptionJulius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In 阅读全文
posted @ 2013-09-27 14:53 dancingrain 阅读(292) 评论(0) 推荐(0)
摘要:As Easy As A+BTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 30295Accepted Submission(s): 12993Problem DescriptionThese days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do such a thing. Of co 阅读全文
posted @ 2013-09-27 13:08 dancingrain 阅读(357) 评论(0) 推荐(0)
摘要:The 3n + 1 problemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18197Accepted Submission(s): 6721Problem DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). I 阅读全文
posted @ 2013-09-26 22:56 dancingrain 阅读(341) 评论(0) 推荐(0)
摘要:最小公倍数Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 27414Accepted Submission(s): 15184Problem Description给定两个正整数,计算这两个数的最小公倍数。Input输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数.Output对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。Sample Input10 14Sample Output70代码如下:#include 阅读全文
posted @ 2013-09-25 23:40 dancingrain 阅读(248) 评论(0) 推荐(0)
摘要:排序Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 28373Accepted Submission(s): 7854Problem Description输入一行数字,如果我们把这行数字中的‘5’都看成空格,那么就得到一行用空格分割的若干非负整数(可能有些整数以‘0’开头,这些头部的‘0’应该被忽略掉,除非这个整数就是由若干个‘0’组成的,这时这个整数就是0)。你的任务是:对这些分割得到的整数,依从小到大的顺序排序输出。Input输入包含多组 阅读全文
posted @ 2013-09-25 23:04 dancingrain 阅读(284) 评论(0) 推荐(0)
摘要:诡异的楼梯Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 5111Accepted Submission(s): 1170Problem DescriptionHogwarts正式开学以后,Harry发现在Hogwarts里,某些楼梯并不是静止不动的,相反,他们每隔一分钟就变动一次方向.比如下面的例子里,一开始楼梯在竖直方向,一分钟以后它移动到了水平方向,再过一分钟它又回到了竖直方向.Harry发现对他来说很难找到能使得他最快到达目的地的路线 阅读全文
posted @ 2012-08-18 19:03 dancingrain 阅读(161) 评论(0) 推荐(0)
摘要:What Are You Talking AboutTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 7555Accepted Submission(s): 2341Problem DescriptionIgnatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian 阅读全文
posted @ 2012-08-16 21:02 dancingrain 阅读(269) 评论(0) 推荐(0)
摘要:NightmareTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4360Accepted Submission(s): 2177Problem DescriptionIgnatius had a nightmare last night. He found himself in a labyrinth with a time bomb on him. The labyrinth has an exit, Ignatius should get 阅读全文
posted @ 2012-08-16 17:11 dancingrain 阅读(370) 评论(0) 推荐(0)
摘要:Ignatius and the Princess ITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7141Accepted Submission(s): 2137Special JudgeProblem DescriptionThe Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess 阅读全文
posted @ 2012-08-16 13:01 dancingrain 阅读(245) 评论(0) 推荐(0)
摘要:Prime Ring ProblemTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14061Accepted Submission(s): 6390Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of nu 阅读全文
posted @ 2012-08-15 21:51 dancingrain 阅读(213) 评论(0) 推荐(0)
摘要:SafecrackerTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4682Accepted Submission(s): 2327Problem Description=== Op tech briefing, 2002/11/02 06:42 CST ==="The item is locked in a Klein safe behind a painting in the second-floor library. Klei 阅读全文
posted @ 2012-08-15 15:00 dancingrain 阅读(260) 评论(0) 推荐(0)