随笔分类 -  ACM-HDU

摘要:重温世界杯Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2398Accepted Submission(s): 723Problem Description世界杯结束了,意大利人连本带利的收回了法国人6年前欠他们的债,捧起了大力神杯,成就了4星意大利.世界杯虽然结束了,但是这界世界杯给我们还是留下许多值得回忆的东西.比如我们听到了黄名嘴的3分钟激情解说,我们懂得了原来可以向同一个人出示3张黄牌,我们还看到了齐达内的头不仅能顶球还能顶人………… 阅读全文
posted @ 2012-07-06 15:00 mtry 阅读(844) 评论(0) 推荐(0)
摘要:Saving James BondTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 712Accepted Submission(s): 136Problem DescriptionThis time let us consider the situation in the movie "Live and Let Die" in which James Bond, the world's most famous spy 阅读全文
posted @ 2012-05-30 23:41 mtry 阅读(885) 评论(0) 推荐(0)
摘要:六度分离Time Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1271Accepted Submission(s): 488Problem Description1967年,美国著名的社会学家斯坦利·米尔格兰姆提出了一个名为“小世界现象(small world phenomenon)”的著名假说,大意是说,任何2个素不相识的人中间最多只隔着6个人,即只用6个人就可以将他们联系在一起,因此他的理论也被称为“六度分离”理论(six degree 阅读全文
posted @ 2012-05-22 15:57 mtry 阅读(239) 评论(0) 推荐(0)
摘要:Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3466Accepted Submission(s): 2113Problem DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai 阅读全文
posted @ 2012-05-16 09:00 mtry 阅读(567) 评论(0) 推荐(0)
摘要:I Hate ItTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14377Accepted Submission(s): 5570Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。在每个 阅读全文
posted @ 2012-05-14 18:45 mtry 阅读(254) 评论(0) 推荐(0)
摘要:Zombie’s Treasure ChestTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1708Accepted Submission(s): 357Problem DescriptionSome brave warriors come to a lost village. They are very lucky and find a lot of treasures and a big treasure chest, but with 阅读全文
posted @ 2012-05-11 15:25 mtry 阅读(1115) 评论(9) 推荐(0)
摘要:Big NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14952Accepted Submission(s): 6631Problem DescriptionIn many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, 阅读全文
posted @ 2012-05-07 15:01 mtry 阅读(1959) 评论(0) 推荐(0)
摘要:Hat's FibonacciTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3442Accepted Submission(s): 1169Problem DescriptionA Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two members being both 1.F(1) = 阅读全文
posted @ 2012-05-07 11:37 mtry 阅读(819) 评论(0) 推荐(0)
摘要:A + B Problem IITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 111273Accepted Submission(s): 21079Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of 阅读全文
posted @ 2012-05-07 09:44 mtry 阅读(2359) 评论(0) 推荐(0)
摘要:Eddy's pictureTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3651Accepted Submission(s): 1793Problem DescriptionEddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his smal 阅读全文
posted @ 2012-05-05 09:34 mtry 阅读(168) 评论(0) 推荐(0)
摘要:Constructing RoadsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6701Accepted Submission(s): 2475Problem DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to e 阅读全文
posted @ 2012-05-05 08:32 mtry 阅读(1853) 评论(2) 推荐(1)
摘要:还是畅通工程Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12633Accepted Submission(s): 5811Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测试输入包含若干测试用例。每个测试用 阅读全文
posted @ 2012-05-04 21:12 mtry 阅读(329) 评论(0) 推荐(0)
摘要:畅通工程 Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 14969Accepted Submission(s): 7702Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input测试输入包含若干测试用例。每个测试用例的第. 阅读全文
posted @ 2012-05-04 19:28 mtry 阅读(365) 评论(0) 推荐(0)
摘要:Number SequenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 56345Accepted Submission(s): 12756Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to 阅读全文
posted @ 2012-05-03 13:53 mtry 阅读(790) 评论(0) 推荐(0)
摘要:Prime Ring ProblemTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12105Accepted Submission(s): 5497Problem 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-04-29 00:39 mtry 阅读(1286) 评论(0) 推荐(0)
摘要:SafecrackerTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3966Accepted Submission(s): 2028Problem 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. Kle 阅读全文
posted @ 2012-04-28 23:52 mtry 阅读(3047) 评论(0) 推荐(3)
摘要:Tempter of the BoneTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33445Accepted Submission(s): 9015Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, a 阅读全文
posted @ 2012-04-28 19:58 mtry 阅读(9128) 评论(1) 推荐(2)
摘要:Fire NetTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3036Accepted Submission(s): 1751Problem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a st 阅读全文
posted @ 2012-04-22 10:08 mtry 阅读(992) 评论(0) 推荐(0)
摘要:FatMouse' TradeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22453Accepted Submission(s): 6992Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBea 阅读全文
posted @ 2012-04-20 16:19 mtry 阅读(266) 评论(0) 推荐(0)
摘要:Max SumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 72615Accepted Submission(s): 16626Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max 阅读全文
posted @ 2012-04-08 23:01 mtry 阅读(9870) 评论(0) 推荐(4)