摘要:The Cow PromTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 643Accepted: 384DescriptionThe N (2 <= N <= 10,000) cows are so excited: it's prom night! They are dressed in their finest gowns, complete with corsages and new shoes. They know that tonight they will each try to perform
阅读全文
摘要:这个结合上题,类似的代码解决的:http://www.cnblogs.com/kuangbin/archive/2011/08/07/2130062.htmlNetwork of SchoolsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 5354Accepted: 2106DescriptionA number of schools are connected to a computer network. Agreements have been developed among those schools: each sch
阅读全文
摘要:Popular CowsTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 13835Accepted: 5484DescriptionEvery cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you are given up to M (1 <= M <= 50,000) ordered pairs of the form (A, B) that t
阅读全文
摘要:Constructing RoadsTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 14128Accepted: 5682DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and only
阅读全文
摘要:Agri-NetTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 22951Accepted: 9047DescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. Farmer John ordered a high speed con
阅读全文
摘要:Jury CompromiseTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 18378Accepted: 4516Special JudgeDescriptionIn Frobnia, a far-away country, the verdicts in court trials are determined by a jury consisting of members of the general public. Every time a trial is set to begin, a jury has to be s
阅读全文
摘要:Common SubsequenceTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 25178Accepted: 9726DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, ..., xm > another sequence Z = < z1, z2, ..., zk >
阅读全文
摘要:Help JimmyTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 6593Accepted: 2066Description"Help Jimmy" 是在下图所示的场景上完成的游戏。 场景中包括多个长度和高度各不相同的平台。地面是最低的平台,高度为零,长度无限。 Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒。当Jimmy落到某个平台上时,游戏者选择让它向左还是向右跑,它跑动的速度也是1米/秒。当Jimmy跑到平台的边缘时,开始继续下落。Jimmy每次下落的高度不能超过MAX
阅读全文
摘要:Longest Ordered SubsequenceTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 19643Accepted: 8501DescriptionA numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ..., aN) be any sequence (ai1, ai2, ..., aiK), where 1 <
阅读全文
摘要:Radar InstallationTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 27114Accepted: 5912DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on
阅读全文
摘要:http://poj.org/problem?id=2965The Pilots Brothers' refrigeratorTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 10158Accepted: 3707Special JudgeDescriptionThe game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 ha
阅读全文
摘要:Flip GameTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 14735Accepted: 6321DescriptionFlip 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 bl
阅读全文
摘要:http://poj.org/problem?id=2245Lotto在玩德国游戏Lotto时,要从集合{1,2,……,49}中取出六个数。一个非常流行的玩法(尽管这种玩法并不能增加你赢的机会)是从这49个数字中取出k个数字(6<k)组成子集S。然后玩游戏的时候仅从S中取出数字。例如,当k=8,S=1,2,3,5,8,13,21,34时,有28种可能的游戏:[1,2,3,5,8,13],[1,2,3,5,8,21],[1,2,3,5,8,34],[1,2,3,5,13,21],……,[3,5,8,13,21,34]。编一个程序,读入k的值和集合S,打印仅从S中取数的所有可能游戏。输入输入
阅读全文
摘要:http://poj.org/problem?id=1019题目:Number SequenceTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 24168Accepted: 6466DescriptionA single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2...Sk. Each group Sk consists
阅读全文
摘要:Maya CalendarTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 45315Accepted: 13855DescriptionDuring his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, professor discovered that the Maya civilization used a 365 day lon
阅读全文