上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 53 下一页
摘要: 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-10-07 17:47 剑不飞 阅读(221) 评论(0) 推荐(0)
摘要: Bessie Come HomeKolstad & Burch It'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 co 阅读全文
posted @ 2012-10-07 12:09 剑不飞 阅读(437) 评论(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-10-07 10:11 剑不飞 阅读(231) 评论(0) 推荐(0)
摘要: OverfencingKolstad and Schrijvers Farmer 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-10-01 12:54 剑不飞 阅读(263) 评论(0) 推荐(0)
摘要: The Tamworth TwoBIO '98 - Richard Forster A 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 ( 阅读全文
posted @ 2012-09-16 17:29 剑不飞 阅读(240) 评论(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-12 20:39 剑不飞 阅读(189) 评论(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-09 21:01 剑不飞 阅读(172) 评论(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 res 阅读全文
posted @ 2012-09-08 20:48 剑不飞 阅读(223) 评论(0) 推荐(0)
摘要: Longest PrefixIOI'96 The 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 compos 阅读全文
posted @ 2012-09-07 12:17 剑不飞 阅读(448) 评论(0) 推荐(0)
摘要: Flip GameTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 20199Accepted: 8752DescriptionFlip 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 阅读全文
posted @ 2012-09-06 19:41 剑不飞 阅读(190) 评论(0) 推荐(0)
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 53 下一页