2013年3月1日

USACO3.3.5--A Game

摘要: A GameIOI'96 - Day 1Consider the following two-player game played with a sequence of N positive integers (2 <= N <= 100) laid onto a game board. Player 1 starts the game. The players move alternately by selecting a number from either the left or the right end of the sequence. That number i 阅读全文

posted @ 2013-03-01 14:16 仗剑奔走天涯 阅读(233) 评论(0) 推荐(0) 编辑

2013年2月28日

UVA11292 - Dragon of Loowater

摘要: Problem C: The Dragon of LoowaterOnce upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek in central Loowater had always been a prime breeding ground for geese. Due to the lack of predators, the geese population was ou... 阅读全文

posted @ 2013-02-28 21:59 仗剑奔走天涯 阅读(169) 评论(0) 推荐(0) 编辑

USACO3.3.1--Riding the Fences

摘要: Riding the FencesFarmer John owns a large number of fences that must be repaired annually. He traverses the fences by riding a horse along each and every 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 same fence twice. Your 阅读全文

posted @ 2013-02-28 17:00 仗剑奔走天涯 阅读(219) 评论(0) 推荐(0) 编辑

2013年2月27日

USACO3.2.6--Sweet 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-27 17:39 仗剑奔走天涯 阅读(224) 评论(0) 推荐(0) 编辑

USACO3.2.3--Spinning Wheels

摘要: Spinning Wheels1998 ACM NE RegionalsEach of five opaque spinning wheels has one or more wedges cut out of its edges. These wedges must be aligned quickly and correctly. Each wheel also has an alignment mark (at 0 degrees) so that the wheels can all be started in a known position. Wheels rotate in th 阅读全文

posted @ 2013-02-27 13:49 仗剑奔走天涯 阅读(234) 评论(0) 推荐(0) 编辑

2013年2月26日

USACO3.2.5--Magic Squares

摘要: Magic SquaresIOI'96Following the success of the magic cube, Mr. Rubik invented its planar version, called magic squares. This is a sheet composed of 8 equal-sized squares:12348765In this task we consider the version where each square has a different color. Colors are denoted by the first 8 posit 阅读全文

posted @ 2013-02-26 22:22 仗剑奔走天涯 阅读(273) 评论(0) 推荐(0) 编辑

USACO3.2.4--Feed Ratios

摘要: Feed Ratios1998 ACM Finals, Dan AdkinsFarmer John feeds his cows only the finest mixture of cow food, which has three components: Barley, Oats, and Wheat. While he knows the precise mixture of these easily mixable grains, he can not buy that mixture! He buys three other mixtures of the three grains 阅读全文

posted @ 2013-02-26 11:14 仗剑奔走天涯 阅读(218) 评论(0) 推荐(0) 编辑

2013年2月25日

USACO3.2.2--Stringsobits

摘要: StringsobitsKim SchrijversConsider 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 and contains all possible strings of length N that have L (1 <= L <= N) or fewer bits that are `1'.Your 阅读全文

posted @ 2013-02-25 18:36 仗剑奔走天涯 阅读(187) 评论(0) 推荐(0) 编辑

2013年2月24日

USACO3.2.1--Factorials

摘要: FactorialsThe factorial of an integer N, written N!, is the product of all the integers from 1 through N inclusive. The factorial quickly becomes very large: 13! is too large to store in a 32-bit integer on most computers, and 70! is too large for most floating-point variables. Your task is to find 阅读全文

posted @ 2013-02-24 14:16 仗剑奔走天涯 阅读(193) 评论(0) 推荐(0) 编辑

USACO3.1.4--Shaping Regions

摘要: 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-24 12:43 仗剑奔走天涯 阅读(268) 评论(0) 推荐(0) 编辑

2013年2月19日

USACO3.1.5--Contact

摘要: 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 @ 2013-02-19 23:24 仗剑奔走天涯 阅读(254) 评论(0) 推荐(0) 编辑

2013年2月18日

USACO3.1.3--Humble Numbers

摘要: 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 @ 2013-02-18 01:03 仗剑奔走天涯 阅读(167) 评论(0) 推荐(0) 编辑

2013年2月17日

USACO3.1.2--Score Inflation

摘要: 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 @ 2013-02-17 15:05 仗剑奔走天涯 阅读(243) 评论(0) 推荐(0) 编辑

USACO3.1.6--Stamps

摘要: 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 @ 2013-02-17 13:25 仗剑奔走天涯 阅读(238) 评论(0) 推荐(0) 编辑

2013年2月16日

USACO3.1.1--Agri-Net

摘要: 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 @ 2013-02-16 19:16 仗剑奔走天涯 阅读(198) 评论(0) 推荐(0) 编辑

导航