USACO
技术--小白
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
USACO Section1.1 Broken Necklace
Broken NecklaceYou have a necklace of N red, white, or blue beads (3 1 2 1 2 r b b r b r r b r原创 2014-01-03 18:36:30 · 239 阅读 · 0 评论 -
USACO Section1.5 Prime Palindromes
Prime PalindromesThe number 151 is a prime palindrome because it is both a prime numberand a palindrome (it is the same number when read forward as backward).Write a program that finds all prime原创 2014-01-10 17:30:09 · 246 阅读 · 0 评论 -
USACO Section1.4 Mother's Milk
Mother's MilkFarmer John has three milking buckets of capacity A, B, and C liters.Each of the numbers A, B, and C is an integer from 1 through 20,inclusive. Initially, buckets A and B are empty原创 2014-01-10 11:26:41 · 218 阅读 · 0 评论 -
USACO section1.5 Superprime Rib
Superprime RibButchering Farmer John's cows always yields the best prime rib. Youcan tell prime ribs by looking at the digits lovingly stamped acrossthem, one by one, by FJ and the USDA. Farmer原创 2014-01-10 18:11:17 · 243 阅读 · 0 评论 -
USACO Section2.1 The Castle
The CastleIOI'94 - Day 1In a stroke of luck almost beyond imagination, Farmer John wassent a ticket to the Irish Sweepstakes (really a lottery) for hisbirthday. This ticket turned out to have on原创 2014-01-13 15:00:00 · 264 阅读 · 0 评论 -
USACO Section2.1 Ordered Fractions
Ordered FractionsConsider the set of all reduced fractions between 0 and 1 inclusivewith denominators less than or equal to N.Here is the set when N = 5:0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4原创 2014-01-13 16:57:11 · 250 阅读 · 0 评论 -
USACO Section2.1 Sorting a Three-Valued Sequence
Sorting a Three-Valued Sequence IOI'96 - Day 2Sorting is one of the most frequently performed computational tasks.Consider the special sorting problem in which the records to be sortedhave at原创 2014-01-14 10:56:09 · 224 阅读 · 0 评论 -
USACO Section2.1 Healthy Holsteins
Healthy HolsteinsBurch & KolstadFarmer John prides himself on having the healthiest dairy cowsin the world. He knows the vitamin content for one scoop of eachfeed type and the minimum daily vita原创 2014-01-14 15:09:41 · 247 阅读 · 0 评论 -
USACO Section2.1 Hamming Codes
Hamming CodesRob KolstadGiven N, B, and D: Find a set of N codewords (1 <= N <= 64),each of length B bits (1 <= B <= 8), such that each of the codewordsis at least Hamming distance of D (1 <= D原创 2014-01-14 16:13:22 · 227 阅读 · 0 评论 -
USACO Section2.2 Preface Numbering
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原创 2014-01-16 10:05:11 · 246 阅读 · 0 评论 -
USACO Section2.2 Subset Sums
Subset SumsJRMFor many sets of consecutive integers from 1 through N (1 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:{原创 2014-01-16 13:20:51 · 223 阅读 · 0 评论 -
USACO Section 2.2 Runaround Numbers
Runaround NumbersRunaround numbers are integers with unique digits, none of which is zero (e.g., 81362) that also have an interesting property, exemplified by this demonstration:If you start原创 2014-01-16 17:38:36 · 241 阅读 · 0 评论 -
USACO Section2.3 Longest Prefix
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原创 2014-01-26 23:27:08 · 236 阅读 · 0 评论 -
USACO Section1.5 Number Triangles
Number TrianglesConsider the number triangle shown below. Write a program thatcalculates the highest sum of numbers that can be passed on a route thatstarts at the top and ends somewhere on the原创 2014-01-10 15:42:44 · 212 阅读 · 0 评论 -
USACO Section1.2 Milking Cows
Milking CowsThree farmers rise at 5 am each morning and head for the barnto milk three cows. The first farmer begins milking his cow at time 300 (measured in seconds after 5 am) and ends at time 1原创 2014-01-03 20:05:58 · 217 阅读 · 0 评论 -
USACO Section1.1 Greedy Gift Givers
Greedy Gift GiversA group of NP (2 ≤ NP ≤ 10) uniquely named friends hasdecided to exchange gifts of money. Each of these friends might ormight not give some money to any or all of the other frien原创 2014-01-03 18:35:16 · 250 阅读 · 0 评论 -
USACO Section1.3 Calf Flac
Calf FlacIt is said that if you give an infinite number of cows an infinitenumber of heavy-duty laptops (with very large keys), that they willultimately produce all the world's great palindromes原创 2014-01-05 22:32:47 · 320 阅读 · 0 评论 -
USACO Section1.1 Friday the Thirteenth
Friday the ThirteenthIs Friday the 13th really an unusual event?That is, does the 13th of the month land on a Friday less often thanon any other day of the week? To answer this question, write a原创 2014-01-03 18:35:53 · 232 阅读 · 0 评论 -
USACO Section1.2 Name That Number
Name That NumberAmong the large Wisconsin cattle ranchers, it is customary to brandcows with serial numbers to please the Accounting Department. The cowhands don't appreciate the advantage of th原创 2014-01-04 10:42:09 · 221 阅读 · 0 评论 -
USACO Section1.2 Palindromic Squares
Palindromic SquaresRob KolstadPalindromes are numbers that read the same forwards as backwards.The number 12321 is a typical palindrome.Given a number base B (2 <= B <= 20 base 10), print all原创 2014-01-04 11:42:11 · 211 阅读 · 0 评论 -
USACO Section1.2 Dual Palindromes
Dual PalindromesMario Cruz (Colombia) & Hugo Rickeboer (Argentina)A number that reads the same from right to left as when read fromleft to right is called a palindrome. The number 12321 is a pal原创 2014-01-04 12:48:47 · 247 阅读 · 0 评论 -
USACO Section1.3 Barn Repair
Barn RepairIt was a dark and stormy night that ripped the roof and gates offthe stalls that hold Farmer John's cows. Happily, many of the cows wereon vacation, so the barn was not completely ful原创 2014-01-04 23:46:23 · 265 阅读 · 0 评论 -
USACO Section1.4 Arithmetic Progressions
Arithmetic ProgressionsAn arithmetic progression is a sequence of the form a, a+b,a+2b, ..., a+nb where n=0,1,2,3,... . For this problem, a is anon-negative integer and b is a positive integer.原创 2014-01-09 17:29:19 · 210 阅读 · 0 评论 -
USACO Section1.2 Transformations
TransformationsA square pattern of size N x N (1 <= N <= 10) black and whitesquare tiles is transformed into another square pattern. Write a programthat will recognize the minimum transformation原创 2014-01-03 23:50:47 · 205 阅读 · 0 评论 -
USACO Section1.3 Mixing Milk
Mixing MilkSince milk packaging is such a low margin business, it is importantto keep the price of the raw product (milk) as low as possible. HelpMerry Milk Makers get the milk they need in the原创 2014-01-04 14:51:58 · 240 阅读 · 0 评论 -
USACO Section1.3 Prime Cryptarithm
Prime CryptarithmThe following cryptarithm is a multiplication problem that can besolved by substituting digits from a specified set of N digits into thepositions marked with *. If the set of pr原创 2014-01-06 11:22:45 · 218 阅读 · 0 评论 -
USACO Section1.4 Packing Rectangles
Packing RectanglesIOI 95The six basic layouts of four rectanglesFour rectangles are given. Find the smallest enclosing (new)rectangle into which these four may be fitted without overlapping.原创 2014-01-06 17:26:00 · 254 阅读 · 0 评论 -
USACO Section1.1 Your Ride Is Here
Your Ride Is HereIt is a well-known fact that behind every good comet is a UFO. TheseUFOs often come to collect loyal supporters from here on Earth.Unfortunately, they only have room to pick up on原创 2014-01-03 18:34:28 · 252 阅读 · 0 评论 -
USACO Section1.5 Checker Challenge
Checker ChallengeExamine the 6x6 checkerboard below and note that the six checkersare arranged on the board so that one and only one is placed in eachrow and each column, and there is never more原创 2014-01-11 16:33:41 · 309 阅读 · 0 评论
分享