随笔分类 -  USACO

USACO Section 3.3 Riding The Fences (fence)
摘要:Riding the Fences Farmer John owns a large number of fences that must be repairedannually. He traverses the fences by riding a horse along each andevery one of them (and nowhere else) and fixing the broken parts. Farmer John is as lazy as the next farmer and hates to ride the samefence twice. You... 阅读全文
posted @ 2013-02-13 20:12 cssystem 阅读(207) 评论(0) 推荐(0)
USACO Section 3.2 Sweet Butter (butter)
摘要:Sweet ButterGreg Galperin -- 2001Farmer John has discovered the secret to making the sweetest butter in all of Wisconsin: sugar. By placing a sugar cube out in the pastures, he knows the N (1 <= N <= 500) cows will lick it and thus will produce super-sweet butter which can be marketed at bette 阅读全文
posted @ 2013-02-13 16:17 cssystem 阅读(451) 评论(0) 推荐(0)
USACO Section 3.2 Magic Squares (msquare)
摘要:Magic SquaresIOI'96Following the success of the magic cube, Mr. Rubik invented its planarversion, called magic squares. This is a sheet composed of 8 equal-sizedsquares:12348765 In this task we consider the version where each square has a differentcolor. Colors are denoted by the first 8 positiv 阅读全文
posted @ 2013-02-13 12:50 cssystem 阅读(327) 评论(0) 推荐(0)
USACO Section 3.2 Feed Ratios (ratios)
摘要:Feed Ratios1998 ACM Finals, Dan Adkins Farmer John feeds his cows only the finest mixture of cow food,which has three components: Barley, Oats, and Wheat. While he knowsthe precise mixture of these easily mixable grains, he can not buy thatmixture! He buys three other mixtures of the three grain... 阅读全文
posted @ 2013-02-13 10:34 cssystem 阅读(264) 评论(0) 推荐(0)
USACO Section 3.2 Spinning Wheels (spin)
摘要:Spinning Wheels1998 ACM NE Regionals Each of five opaque spinning wheels has one or more wedges cutout of its edges. These wedges must be aligned quickly and correctly.Each wheel also has an alignment mark (at 0 degrees) so that thewheels can all be started in a known position. Wheels rotate inth... 阅读全文
posted @ 2013-02-13 00:13 cssystem 阅读(418) 评论(0) 推荐(0)
USACO Section 3.2 Stringsobits (kimbits)
摘要:StringsobitsKim Schrijvers Consider an ordered set S of strings of N (1 <= N <= 31)bits. Bits, of course, are either 0 or 1. This set of strings is interesting because it is ordered andcontains all possible strings of length N that have L (1 <= L<= N) or fewer bits that are `1'. Your 阅读全文
posted @ 2013-02-12 22:06 cssystem 阅读(327) 评论(0) 推荐(0)
USACO Section 3.1 Shaping Regions (rect1)
摘要:Shaping RegionsN opaque rectangles (1 <= N <= 1000) of various colors are placed on a white sheet of paper whose size is A wide by B long. The rectangles are put with their sides parallel to the sheet's borders. All rectangles fall within the borders of the sheet so that different figures 阅读全文
posted @ 2013-02-11 19:05 cssystem 阅读(234) 评论(0) 推荐(0)
USACO Section 3.1 Contact (contact)
摘要:ContactIOI'98The cows have developed a new interest in scanning the universeoutside their farm with radiotelescopes. Recently, they noticed a verycurious microwave pulsing emission sent right from the centre of thegalaxy. They wish to know if the emission is transmitted by someextraterrestrial f 阅读全文
posted @ 2013-02-10 17:56 cssystem 阅读(341) 评论(0) 推荐(0)
USACO Section 3.1 Stamps (stamps)
摘要:Stamps Given a set of N stamp values (e.g., {1 cent, 3 cents}) and an upperlimit K to the number of stamps that can fit on an envelope, calculate thelargest unbroken list of postages from 1 cent to M cents that can becreated. For example, consider stamps whose values are limited to 1 cent and 3cent. 阅读全文
posted @ 2013-02-10 12:18 cssystem 阅读(260) 评论(0) 推荐(0)
USACO Section 3.1 Humble Numbers (humble)
摘要:Humble Numbers For a given set of K prime numbers S = {p1, p2,..., pK}, consider the set of all numbers whose prime factors area subset of S. This set contains, for example, p1,p1p2, p1p1, andp1p2p3 (among others). This is the setof `humble numbers' for the input set S. Note: The number 1 is exp 阅读全文
posted @ 2013-02-06 19:42 cssystem 阅读(316) 评论(0) 推荐(0)
USACO Section 3.1 Score Inflation (inflate)
摘要:Score InflationThe more points students score in our contests, the happier we hereat the USACO are. We try to design our contests so that people can scoreas many points as possible, and would like your assistance. We have several categories from which problems can be chosen, wherea "category&qu 阅读全文
posted @ 2013-02-06 10:56 cssystem 阅读(235) 评论(0) 推荐(0)
USACO Section 3.1 Agri-Net (agrinet)
摘要:Agri-NetRuss Cox Farmer John has been elected mayor of his town! One of his campaignpromises 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 isgoing to share his connectivity with the other farm.. 阅读全文
posted @ 2013-02-06 09:09 cssystem 阅读(342) 评论(0) 推荐(0)
USACO Section 3.2 Factorials (fact4)
摘要:Factorials The factorial of an integer N, written N!, is the product of allthe integers from 1 through N inclusive. The factorial quickly becomesvery large: 13! is too large to store in a 32-bit integer on mostcomputers, and 70! is too large for most floating-point variables. Yourtask is to find th. 阅读全文
posted @ 2013-01-31 11:24 cssystem 阅读(194) 评论(0) 推荐(0)
USACO Section 2.4 Fractions to Decimals (fracdec)
摘要:Fractions to Decimals Write a program that will accept a fraction of the form N/D, whereN is the numerator and D is the denominator and print the decimalrepresentation. If the decimal representation has a repeating sequenceof digits, indicate the sequence by enclosing it in brackets. For example,1.. 阅读全文
posted @ 2013-01-31 09:01 cssystem 阅读(431) 评论(0) 推荐(0)
USACO Section 2.4 Bessie Come Home (comehome)
摘要: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. Yourjob is to figure out which one cow gets to the barn first (the suppliedtest data will always have exactly one fastest cow).B 阅读全文
posted @ 2013-01-30 23:56 cssystem 阅读(333) 评论(0) 推荐(0)
USACO Section 2.4 Cow Tours (cowtour)
摘要:Cow ToursFarmer John has a number of pastures on his farm. Cow pathsconnect some pastures with certain other pastures, forming a field.But, at the present time, you can find at least two pastures thatcannot be connected by any sequence of cow paths, thus partitioningFarmer John's farm into multi 阅读全文
posted @ 2013-01-30 23:10 cssystem 阅读(856) 评论(0) 推荐(0)
USACO Section 2.4 Overfencing (maze1)
摘要:OverfencingKolstad and Schrijvers Farmer John went crazy and created a huge maze of fences out in afield. Happily, he left out two fence segments on the edges, and thuscreated two "exits" for the maze. Even more happily, the mazehe created by this overfencing experience is a `perfect' 阅读全文
posted @ 2013-01-30 23:06 cssystem 阅读(383) 评论(0) 推荐(0)


点击右上角即可分享
微信分享提示