摘要:FroggerTime Limit:1000MSMemory Limit:65536KTotal Submissions:20310Accepted:6597DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists' sunscreen
阅读全文
摘要:Prime DistanceTime Limit:1000MSMemory Limit:65536KTotal Submissions:9322Accepted:2531DescriptionThe branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the question of primality.
阅读全文
摘要:Cut the SequenceTime Limit:2000MSMemory Limit:131072KTotal Submissions:7972Accepted:2287DescriptionGiven an integer sequence {an} of lengthN, you are to cut the sequence into several parts every one of which is a consecutive subsequence of the original sequence. Every part must satisfy that the sum
阅读全文
摘要:题目链接:http://poj.org/problem?id=2955BracketsTime Limit:1000MSMemory Limit:65536KTotal Submissions:1977Accepted:1012DescriptionWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence,ifsis a regular brackets sequence, then (s) and [
阅读全文
摘要:Mondriaan's DreamTime Limit:3000MSMemory Limit:65536KTotal Submissions:8974Accepted:5187DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, f
阅读全文
摘要:Islands and BridgesTime Limit:4000MSMemory Limit:65536KTotal Submissions:7685Accepted:1968DescriptionGiven a map of islands and bridges that connect these islands, a Hamilton path, as we all know, is a path along the bridges such that it visits each island exactly once. On our map, there is also a p
阅读全文
摘要:炮兵阵地Time Limit:2000MSMemory Limit:65536KTotal Submissions:14519Accepted:5406Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的网格表示它能够攻击到的区域:沿
阅读全文
摘要:Corn FieldsTime Limit:2000MSMemory Limit:65536KTotal Submissions:4739Accepted:2506DescriptionFarmer John has purchased a lush new rectangular pasture composed ofMbyN(1 ≤M≤ 12; 1 ≤N≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of squares. Regrettably, some of the squ
阅读全文
摘要:Life FormsTime Limit:5000MSMemory Limit:65536KTotal Submissions:7322Accepted:2011DescriptionYou may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, colour, wrinkles, ears, eyebrows and the like. A few bear no human resemblance; thes
阅读全文
摘要:Common SubstringsTime Limit:5000MSMemory Limit:65536KTotal Submissions:5495Accepted:1822DescriptionA substring of a stringTis defined as:T(i,k)=TiTi+1...Ti+k-1, 1≤i≤i+k-1≤|T|.Given two stringsA,Band one integerK, we defineS, a set of triples (i,j,k):S= {(i,j,k) |k≥K,A(i,k)=B(j,k)}.You are to give th
阅读全文
摘要:Maximum repetition substringTime Limit:1000MSMemory Limit:65536KTotal Submissions:5292Accepted:1573DescriptionThe repetition number of a string is defined as the maximum numberRsuch that the string can be partitioned intoRsame consecutive substrings. For example, the repetition number of "ababa
阅读全文
摘要:Milk PatternsTime Limit:5000MSMemory Limit:65536KTotal Submissions:7586Accepted:3448Case Time Limit:2000MSDescriptionFarmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that although he can't predict the quality of mi
阅读全文
摘要:Musical ThemeTime Limit:1000MSMemory Limit:30000KTotal Submissions:14334Accepted:4945DescriptionA musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It is unfortunate but true that this representation
阅读全文
摘要:PictureTime Limit:2000MSMemory Limit:10000KTotal Submissions:8975Accepted:4741DescriptionA number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle can be partially or totally covered by the other
阅读全文
摘要:Help with IntervalsTime Limit:6000MSMemory Limit:131072KTotal Submissions:7850Accepted:1818Case Time Limit:2000MSDescriptionLogLoader, Inc. is a company specialized in providing products for analyzing logs. While Ikki is working on graduation design, he is also engaged in an internship at LogLoader.
阅读全文
摘要:True LiarsTime Limit:1000MSMemory Limit:10000KTotal Submissions:1556Accepted:457DescriptionAfter having drifted about in a small boat for a couple of days, Akira Crusoe Maeda was finally cast ashore on a foggy island. Though he was exhausted and despaired, he was still fortunate to remember a legend
阅读全文
摘要:RochambeauTime Limit:5000MSMemory Limit:65536KTotal Submissions:1575Accepted:540DescriptionNchildren are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into three groups (it is possible that some group is empty). You don’t know who is
阅读全文
摘要:Parity gameTime Limit:1000MSMemory Limit:65536KTotal Submissions:5168Accepted:2028DescriptionNow and then you play the following game with your friend. Your friend writes down a sequence consisting of zeroes and ones. You choose a continuous subsequence (for example the subsequence from the third to
阅读全文
摘要:SupermarketTime Limit:2000MSMemory Limit:65536KTotal Submissions:7501Accepted:3148DescriptionA supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the moment the sale beg
阅读全文
摘要:Ubiquitous ReligionsTime Limit:5000MSMemory Limit:65536KTotal Submissions:19259Accepted:9460DescriptionThere are so many different religions in the world today that it is difficult to keep track of them all. You are interested in finding out how many different religions students in your university b
阅读全文