上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: ContactIOI'98The cows have developed a new interest in scanning the universe outside their farm with radiotelescopes. Recently, they noticed a very curious microwave pulsing emission sent right from the centre of the galaxy. They wish to know if the emission is transmitted by some extraterrestri 阅读全文
posted @ 2012-09-12 16:54 mtry 阅读(679) 评论(0) 推荐(0)
摘要: StampsGiven a set of N stamp values (e.g., {1 cent, 3 cents}) and an upper limit K to the number of stamps that can fit on an envelope, calculate the largest unbroken list of postages from 1 cent to M cents that can be created.For example, consider stamps whose values are limited to 1 cent and 3 cen 阅读全文
posted @ 2012-09-12 09:31 mtry 阅读(403) 评论(0) 推荐(0)
摘要: Humble NumbersFor a given set of K prime numbers S = {p1, p2, ..., pK}, consider the set of all numbers whose prime factors are a subset of S. This set contains, for example, p1, p1p2, p1p1, and p1p2p3(among others). This is the set of `humble numbers' for the input set S. Note: The number 1 is 阅读全文
posted @ 2012-09-11 17:36 mtry 阅读(452) 评论(0) 推荐(0)
摘要: Score InflationThe more points students score in our contests, the happier we here at the USACO are. We try to design our contests so that people can score as many points as possible, and would like your assistance.We have several categories from which problems can be chosen, where a "category& 阅读全文
posted @ 2012-09-11 10:50 mtry 阅读(347) 评论(0) 推荐(0)
摘要: Agri-NetRuss CoxFarmer 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 connection for his farm and is going to share his connectivity with the other farme 阅读全文
posted @ 2012-09-11 09:27 mtry 阅读(281) 评论(0) 推荐(0)
摘要: Fractions to DecimalsWrite a program that will accept a fraction of the form N/D, where N is the numerator and D is the denominator and print the decimal representation. If the decimal representation has a repeating sequence of digits, indicate the sequence by enclosing it in brackets. For example, 阅读全文
posted @ 2012-09-10 21:55 mtry 阅读(348) 评论(0) 推荐(1)
摘要: A very hard mathematic problemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 991Accepted Submission(s): 287Problem Description Haoren is very good at solving mathematic problems. Today he is working a problem like this: Find three positive integ.. 阅读全文
posted @ 2012-09-10 17:34 mtry 阅读(896) 评论(2) 推荐(1)
摘要: Alice and BobTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 559Accepted Submission(s): 224Problem DescriptionAlice and Bob's game never ends. Today, they introduce a new game. In this game, both of them have N different rectangular cards resp 阅读全文
posted @ 2012-09-10 15:41 mtry 阅读(1223) 评论(0) 推荐(0)
摘要: The Tamworth TwoBIO '98 - Richard ForsterA pair of cows is loose somewhere in the forest. Farmer John is lending his expertise to their capture. Your task is to model their behavior.The chase takes place on a 10 by 10 planar grid. Squares can be empty or they can contain:an obstacle,the cows (wh 阅读全文
posted @ 2012-09-07 22:43 mtry 阅读(235) 评论(0) 推荐(0)
摘要: Bessie Come HomeKolstad & BurchIt's dinner time, and the cows are out in their separate pastures. Farmer John rings the bell so they will start walking to the barn. Your job is to figure out which one cow gets to the barn first (the supplied test data will always have exactly one fastest cow 阅读全文
posted @ 2012-09-07 16:59 mtry 阅读(399) 评论(0) 推荐(0)
摘要: Cow ToursFarmer John has a number of pastures on his farm. Cow paths connect some pastures with certain other pastures, forming a field. But, at the present time, you can find at least two pastures that cannot be connected by any sequence of cow paths, thus partitioning Farmer John's farm into m 阅读全文
posted @ 2012-09-07 11:15 mtry 阅读(769) 评论(0) 推荐(1)
摘要: OverfencingKolstad and SchrijversFarmer John went crazy and created a huge maze of fences out in a field. Happily, he left out two fence segments on the edges, and thus created two "exits" for the maze. Even more happily, the maze he created by this overfencing experience is a `perfect' 阅读全文
posted @ 2012-09-06 10:10 mtry 阅读(330) 评论(0) 推荐(0)
摘要: Zero SumConsider the sequence of digits from 1 through N (where N=9) in increasing order:1 2 3 ... N.Now insert either a `+' for addition or a `-' for subtraction or a ` ' [blank] to run the digits together between each pair of digits (not in front of the first digit). Calculate the resu 阅读全文
posted @ 2012-09-05 14:00 mtry 阅读(661) 评论(0) 推荐(0)
摘要: Longest PrefixIOI'96The structure of some biological objects is represented by the sequence of their constituents, where each part is denote by an uppercase letter. Biologists are interested in decomposing a long sequence into shorter ones calledprimitives.We say that a sequence S can be compose 阅读全文
posted @ 2012-09-05 11:07 mtry 阅读(437) 评论(0) 推荐(0)
摘要: Cow PedigreesSilviu Ganceanu -- 2003Farmer John is considering purchasing a new herd of cows. In this new herd, each mother cow gives birth to two children. The relationships among the cows can easily be represented by one or more binary trees with a total of N (3 <= N < 200) nodes. The trees 阅读全文
posted @ 2012-09-04 21:26 mtry 阅读(685) 评论(0) 推荐(0)
摘要: Money SystemsThe cows have not only created their own government but they have chosen to create their own money system. In their own rebellious way, they are curious about values of coinage. Traditionally, coins come in values like 1, 5, 10, 20 or 25, 50, and 100 units, sometimes with a 2 unit coin 阅读全文
posted @ 2012-09-04 15:57 mtry 阅读(470) 评论(0) 推荐(0)
摘要: Controlling CompaniesSome companies are partial owners of other companies because they have acquired part of their total shares of stock. For example, Ford owns 12% of Mazda. It is said that a company A controls company B if at least one of the following conditions is satisfied:Company A = Company B 阅读全文
posted @ 2012-09-04 15:23 mtry 阅读(408) 评论(0) 推荐(0)
摘要: Preface NumberingA certain book's prefaces are numbered in upper case Roman numerals. Traditional Roman numeral values use a single letter to represent a certain subset of decimal numbers. Here is the standard set: I 1 L 50 M 1000 V 5 C 100 X 10 D 500As ... 阅读全文
posted @ 2012-09-03 20:40 mtry 阅读(290) 评论(0) 推荐(0)
摘要: Party LampsIOI 98To brighten up the gala dinner of the IOI'98 we have a set ofN(10 <= N <= 100) colored lamps numbered from 1 toN.The lamps are connected to four buttons:Button 1: When this button is pressed, all the lamps change their state: those that are ON are turned OFF and those that 阅读全文
posted @ 2012-09-02 21:02 mtry 阅读(401) 评论(0) 推荐(0)
摘要: Subset SumsJRMFor many sets of consecutive integers from 1 through N (1 <= N <= 39), one can partition the set into two sets whose sums are identical.For example, if N=3, one can partition the set {1, 2, 3} in one way so that the sums of both subsets are identical:{3} and {1,2}This counts as a 阅读全文
posted @ 2012-09-01 11:29 mtry 阅读(1158) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 10 下一页