摘要: Problem DescriptionIn Pearlania everybody is fond of pearls. One company, called The Royal Pearl, produces a lot of jewelry with pearls in it. The Royal Pearl has its name because it delivers to the royal family of Pearlania. But it also produces bracelets and necklaces for ordinary people. Of cours 阅读全文
posted @ 2013-09-01 21:15 persistent codeants 阅读(254) 评论(0) 推荐(0)
摘要: Problem DescriptionA Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate @ bills for a requested cash amount. The machine uses exactly N distinct bill denominations, say Dk, k=1,N, and for each denomination Dk the machine has a supply of nk bills. For exam 阅读全文
posted @ 2013-09-01 20:25 persistent codeants 阅读(276) 评论(0) 推荐(0)
摘要: 1129. Door PaintingTime limit: 0.25 second Memory limit: 64 MBThere are many rooms, corridors and doors between them in the kindergarten. Some repairs are planned to be made soon. The doors are agreed to be painted in bright cheerful colors: green and yellow. The matron of the kindergarten wants the 阅读全文
posted @ 2013-08-31 21:40 persistent codeants 阅读(278) 评论(0) 推荐(0)
摘要: Problem DescriptionIt is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, and T. Biologists have been interested in identifying human genes and determining their functions, because these can be used to di 阅读全文
posted @ 2013-08-31 19:53 persistent codeants 阅读(203) 评论(0) 推荐(0)
摘要: 1077. Travelling ToursTime limit: 1.0 second Memory limit: 64 MBThere areNcities numbered from 1 toN(1≤N≤200) andMtwo-way roads connect them. There are at most one road between two cities. In summer holiday, members of DSAP Group want to make some traveling tours. Each tour is a route passesKdiffere 阅读全文
posted @ 2013-08-26 20:55 persistent codeants 阅读(302) 评论(0) 推荐(0)
摘要: DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to regrow. Thus, Farmer John has built a set of drainage ditches so that Bessie's clover patch i 阅读全文
posted @ 2013-08-23 09:34 persistent codeants 阅读(202) 评论(0) 推荐(0)
摘要: Problem DescriptionNetwork flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighted directed graph.InputThe first line of input contains an integer T, denoting the number of test cases. For each test case, the first line contains tw 阅读全文
posted @ 2013-08-22 21:11 persistent codeants 阅读(201) 评论(0) 推荐(0)
摘要: 1354. Palindrome. Again PalindromeTime limit: 1.0 second Memory limit: 64 MBAwordis the nonempty sequence of symbolsa1a2…an. Apalindromeis the worda1a2…anthat is read from the left to the right and from the right to the left the same way (a1a2…an=anan−1…a1). IfS1=a1a2…anandS2=b1b2…bm, thenS1S2=a1a2… 阅读全文
posted @ 2013-08-22 15:58 persistent codeants 阅读(201) 评论(0) 推荐(0)
摘要: 1423. String TaleTime limit: 1.0 second Memory limit: 64 MBBackgroundI want to tell you a story. Not entirely, but only the very beginning, because the ending of this story became a legend of programming—as well as its heroes.When computers were large, when trees were small, when the sun shined brig 阅读全文
posted @ 2013-08-22 15:00 persistent codeants 阅读(244) 评论(0) 推荐(0)
摘要: Problem DescriptionA network of m roads connects N cities (numbered from 1 to N). There may be more than one road connecting one city with another. Some of the roads are paid. There are two ways to pay for travel on a paid road i from city ai to city bi:in advance, in a city ci (which may or may not 阅读全文
posted @ 2013-08-21 20:55 persistent codeants 阅读(166) 评论(0) 推荐(0)