![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
USACO
文章平均质量分 83
zztant
这个作者很懒,什么都没留下…
展开
-
USACO SECTION 4.1 Beef McNuggets
Beef McNuggetsHubert Chen Farmer Brown's cows are up in arms, having heard that McDonalds is considering the introduction of a new product: Beef McNuggets. The cows are trying to find any possible原创 2012-08-29 11:32:24 · 264 阅读 · 0 评论 -
USACO SECTION 3.4 Electric Fence
Electric FenceDon Piele In this problem, `lattice points' in the plane are points with integer coordinates.In order to contain his cows, Farmer John constructs a triangular electric fence by s原创 2012-08-27 13:12:56 · 236 阅读 · 0 评论 -
USACO SECTION 4.3 The Primes
The PrimesIOI'94 In the square below, each row, each column and the two diagonals can be read as a five digit prime number. The rows are read from left to right. The columns are read from top to b原创 2012-10-04 13:54:49 · 263 阅读 · 0 评论 -
USACO SECTION 4.3 Street Race
Street RaceIOI'95 Figure 1 gives an example of a course for a street race. You see some points, labeled from 0 to N (here, N=9), and some arrows connecting them. Point 0 is the start of the race;原创 2012-10-04 13:57:52 · 295 阅读 · 0 评论 -
USACO SECTION 4.3 Letter Game
Letter GameIOI 1995 Figure 1: Each of the 26 lowercase letters and its value Letter games are popular at home and on television. In one version of the game, every letter has a value, and you原创 2012-10-04 14:00:26 · 306 阅读 · 0 评论 -
USACO SECTION 4.4 Pollutant Control
Pollutant ControlHal Burch It's your first day in Quality Control at Merry Milk Makers, and already there's been a catastrophe: a shipment of bad milk has been sent out. Unfortunately, you didn't原创 2012-10-04 14:09:25 · 276 阅读 · 0 评论 -
USACO SECTION 5.3 Window Area
Window AreaIV Balkan Olympiad You've just be assigned the project of implemented a windowing interface. This windowing interface is fairly simple, and fortunately, you don't have to display the ac原创 2012-10-04 14:46:15 · 276 阅读 · 0 评论 -
USACO SECTION 4.1 Cryptcowgraphy
CryptcowgraphyBrian Dean The cows of Farmer Brown and Farmer John are planning a coordinated escape from their respective farms and have devised a method of encryption to protect their written com原创 2012-10-03 17:40:38 · 311 阅读 · 0 评论 -
USACO SECTION 4.3 Buy Low, Buy Lower
Buy Low, Buy LowerThe advice to "buy low" is half the formula to success in the stock market. But to be considered a great investor you must also follow this problems' advice:"Buy low, buy lower原创 2012-10-04 13:47:25 · 358 阅读 · 0 评论 -
USACO SECTION 3.4 Closed Fences(未完成)
Closed FencesA closed fence in the plane is a set of non-crossing, connected line segments with N corners (3 i, yi}, i in (1..N). Every pair of adjacent vertices defines a side of the fence. T原创 2012-08-26 14:47:12 · 258 阅读 · 0 评论 -
USACO SECTION 3.4 American Heritage
American HeritageFarmer John takes the heritage of his cows very seriously. He is not, however, a truly fine bookkeeper. He keeps his cow genealogies as binary trees and, instead of writing them i原创 2012-08-26 16:26:06 · 237 阅读 · 0 评论 -
USACO SECTION 3.3 A Game
A GameIOI'96 - Day 1 Consider 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 alterna原创 2012-08-25 18:57:20 · 280 阅读 · 0 评论 -
USACO SECTION 3.4 Raucous Rockers
Raucous RockersYou just inherited the rights to N (1 <= N <= 20) previously unreleased songs recorded by the popular group Raucous Rockers. You plan to release a set of M (1 <= M <= 20) compact di原创 2012-08-28 14:53:57 · 251 阅读 · 0 评论 -
USACO SECTION 3.2 Magic Squares
Magic SquaresIOI'96 Following 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:1234原创 2012-08-20 10:52:03 · 286 阅读 · 0 评论 -
USACO SECTION 3.2 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 <=原创 2012-08-20 22:38:59 · 273 阅读 · 0 评论 -
USACO SECTION 3.3 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原创 2012-08-21 13:36:10 · 294 阅读 · 0 评论 -
USACO SECTION 3.3 Shopping Offers
Shopping OffersIOI'95 In a certain shop, each kind of product has an integer price. For example, the price of a flower is 2 zorkmids (z) and the price of a vase is 5z. In order to attract more cus原创 2012-08-22 16:58:53 · 454 阅读 · 0 评论 -
USACO SECTION 3.3 Camelot
CamelotIOI 98 Centuries ago, King Arthur and the Knights of the Round Table used to meet every year on New Year's Day to celebrate their fellowship. In remembrance of these events, we consider a b原创 2012-08-24 01:34:45 · 318 阅读 · 0 评论 -
USACO SECTION 1.4 Packing Rectangles (未完成)
Packing RectanglesIOI 95 The six basic layouts of four rectangles Four rectangles are given. Find the smallest enclosing (new) rectangle into which these four may be fitted without overlappin原创 2012-07-28 01:51:47 · 308 阅读 · 0 评论 -
USACO SECTION 3.3 Home on the Range
Home on the RangeFarmer John grazes his cows on a large, square field N (2 <= N <= 250) miles on a side (because, for some reason, his cows will only graze on precisely square land segments). Regr原创 2012-08-25 12:08:35 · 292 阅读 · 0 评论 -
USACO SECTION 5.2 Electric Fences
Electric FencesKolstad & Schrijvers Farmer John has decided to construct electric fences. He has fenced his fields into a number of bizarre shapes and now must find the optimal place to locate the原创 2012-10-04 14:27:53 · 404 阅读 · 0 评论 -
USACO SECTION 4.4 Frame Up
Frame UpConsider the following five picture frames shown on an 9 x 8 array: ........ ........ ........ ........ .CCC....EEEEEE.. ........ ........ ..BBBB.. .C.C....E....E.. D原创 2012-10-04 14:14:54 · 292 阅读 · 0 评论 -
USACO SECTION 4.1 Fence Loops
Fence LoopsThe fences that surround Farmer Brown's collection of pastures have gotten out of control. They are made up of straight segments from 1 through 200 feet long that join together only at原创 2012-10-03 17:36:06 · 289 阅读 · 0 评论 -
Milk Measuring
Milk MeasuringHal Burch Farmer John must measure Q (1 <= Q <= 20,000) quarts of his finest milk and deliver it in one big bottle to a customer. He fills that bottle with exactly the number of quar原创 2012-10-04 14:31:26 · 86 阅读 · 0 评论 -
USACO SECTION 5.3 Milk Measuring
Milk MeasuringHal Burch Farmer John must measure Q (1 Farmer John has always been frugal. He is at the cow hardware store where he must purchase a set of pails with which to measure out Q quarts原创 2012-10-04 14:43:28 · 307 阅读 · 0 评论 -
USACO SECTION 1.0 Your Ride Is Here
SAMPLE INPUT (file ride.in) COMETQHVNGATOUTPUT FORMATA single line containing either the word "GO" or the word "STAY".SAMPLE OUTPUT (file ride.out)GO/*ID: conicoc1LANG: CTASK: ride*原创 2012-07-23 01:47:21 · 295 阅读 · 0 评论 -
USACO SECTION 1.1 Your Ride Is HereGreedy Gift Givers
Greedy Gift GiversSAMPLE INPUT (file gift1.in) 5davelauraowenvickamrdave200 3lauraowenvickowen500 1daveamr150 2vickowenlaura0 2amrvickvick0 0OUTPUT FORMATThe outp原创 2012-07-23 15:54:47 · 214 阅读 · 0 评论 -
USACO SECTION 1.2 Milking Cows
Milking CowsSAMPLE INPUT (file milk2.in) 3300 1000700 12001500 2100OUTPUT FORMATA single line with two integers that represent the longest continuous time of milking and the longest idl原创 2012-07-24 20:42:17 · 231 阅读 · 0 评论 -
USACO SECTION 1.1 Friday the Thirteenth
INPUT FORMATOne line with the integer N.SAMPLE INPUT (file friday.in) 20OUTPUT FORMATSeven space separated integers on one line. These integers represent the number of times the 13th falls原创 2012-07-23 17:41:43 · 251 阅读 · 0 评论 -
USACO SECTION 1.2 Transformations
TransformationsSAMPLE INPUT (file transform.in) 3@-@---@@-@-@@----@OUTPUT FORMATA single line containing the the number from 1 through 7 (described above) that categorizes the transfo原创 2012-07-24 23:24:57 · 223 阅读 · 0 评论 -
USACO SECTION 1.2 Name That Number
Name That NumberAmong the large Wisconsin cattle ranchers, it is customary to brand cows with serial numbers to please the Accounting Department. The cow hands don't appreciate the advantage of th原创 2012-07-25 02:55:45 · 226 阅读 · 0 评论 -
USACO SECTION 4.4 Shuttle Puzzle
Shuttle PuzzleTraditional The Shuttle Puzzle of size 3 consists of 3 white marbles, 3 black marbles, and a strip of wood with 7 holes. The marbles of the same color are placed in the holes at the原创 2012-10-04 14:04:20 · 586 阅读 · 0 评论 -
USACO SECTION 4.2 Job Processing
Job ProcessingIOI'96 A factory is running a production line that requires two operations to be performed on each job: first operation "A" then operation "B". Only a certain number of machines are原创 2012-10-04 13:38:58 · 266 阅读 · 0 评论 -
USACO SECTION 4.1 Fence Rails
Fence RailsBurch, Kolstad, and Schrijvers Farmer John is trying to erect a fence around part of his field. He has decided on the shape of the fence and has even already installed the posts, but he原创 2012-10-03 17:29:13 · 457 阅读 · 0 评论 -
USACO SECTION 4.2 Drainage Ditches
Drainage DitchesHal Burch Every 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原创 2012-10-03 18:12:35 · 282 阅读 · 0 评论 -
USACO SECTION 4.2 The Perfect Stall
The Perfect StallHal Burch Farmer John completed his new barn just last week, complete with all the latest milking technology. Unfortunately, due to engineering problems, all the stalls in the new原创 2012-10-03 18:16:31 · 269 阅读 · 0 评论 -
USACO SECTION 4.2 Cowcycles
CowcyclesOriginally by Don Gillies [International readers should note that some words are puns on cows.] Having made a fortune on Playbov magazine, Hugh Heifer has moved from his original field原创 2012-10-04 13:42:08 · 335 阅读 · 0 评论 -
USACO SECTION 5.1 Fencing the Cows
Fencing the CowsHal Burch Farmer John wishes to build a fence to contain his cows, but he's a bit short on cash right. Any fence he builds must contain all of the favorite grazing spots for his co原创 2012-10-04 14:16:34 · 259 阅读 · 0 评论 -
USACO SECTION 5.1 Starry Night
Starry NightIOI 98 High up in the night sky, the shining stars appear in clusters of various shapes. Acluster is a non-empty group of neighbouring stars, adjacent in horizontal, vertical or diag原创 2012-10-04 14:20:40 · 340 阅读 · 0 评论 -
USACO SECTION 5.1 Musical Themes
Musical ThemesBrian Dean A musical melody is represented as a sequence of N (1 <= N <= 5000) notes that are integers in the range 1..88, each representing a key on the piano. It is unfortunate but原创 2012-10-04 14:23:47 · 339 阅读 · 0 评论