USACO
文章平均质量分 81
iby07
这个作者很懒,什么都没留下…
展开
-
Greedy Gift Givers
Problem:Greedy Gift GiversA group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not give some money to any or all of the other friends. Likewise, each friend might or might not rec原创 2010-12-08 20:39:00 · 301 阅读 · 0 评论 -
Checker Challenge
Problem:Checker ChallengeExamine the 6x6 checkerboard below and note that the six checkers are arranged on the board so that one and only one is placed in each row and each column, and there is never more than one in any diagonal. (Diagonals run from south原创 2011-01-04 22:38:00 · 463 阅读 · 0 评论 -
The Castle
Problem:The Castle<br />IOI'94 - Day 1<br />In a stroke of luck almost beyond imagination, Farmer John was sent a ticket to the Irish Sweepstakes (really a lottery) for his birthday. This ticket turned out to have only the winning number for the lottery! F原创 2011-01-04 22:42:00 · 489 阅读 · 0 评论 -
Number Triangles
Problem: Number TrianglesConsider the number triangle shown below. Write a program that calculates the highest sum of numbers that can be passed on a route that starts at the top and ends somewhere on the base. Each step can go either diagonally down to th原创 2011-01-02 16:04:00 · 367 阅读 · 0 评论 -
Prime Palindromes
Problem:Prime PalindromesThe number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as backward). Write a program that finds all prime palindromes in the range of two supplied numbers a原创 2011-01-02 18:31:00 · 582 阅读 · 0 评论 -
Healthy Holsteins
Problem:Healthy HolsteinsFarmer John prides himself on having the healthiest dairy cows in the world. He knows the vitamin con原创 2011-09-18 11:32:39 · 578 阅读 · 2 评论 -
Sorting a Three-Valued Sequence
Problem:Sorting a Three-Valued Sequence Sorting is one of the most frequently performed computational tasks. Consider the specia原创 2011-09-18 11:27:30 · 486 阅读 · 0 评论 -
Hamming Code
Problem:http://ace.delos.com/usacoprob2?a=GDaP3qeGiYp&S=hammingMy Answer:/*ID:iby071LANG:C++TASK:hamming*/#include#includ原创 2011-09-18 11:35:00 · 380 阅读 · 0 评论 -
Ordered Fractions
Problem:Ordered FractionsConsider the set of all reduced fractions between 0 and 1 inclusive with denominators less than or equal原创 2011-09-18 11:22:29 · 766 阅读 · 2 评论 -
Preface Numbering
Problem:http://ace.delos.com/usacoprob2?a=GDaP3qeGiYp&S=prefaceMy Answer:/*ID:Iby071LANG:C++TASK:preface*/#include#includ原创 2011-09-18 11:37:13 · 471 阅读 · 0 评论 -
Subset Sums
Problem:http://ace.delos.com/usacoprob2?a=GDaP3qeGiYp&S=subsetMy Answer:/*ID:iby071LANG:C++TASK:subset*/#include#includeus原创 2011-09-18 11:39:57 · 331 阅读 · 0 评论 -
Runaround Numbers
Problem:http://ace.delos.com/usacoprob2?a=GDaP3qeGiYp&S=runroundAnswer:/*ID:iby071TASK:runroundLANG:C++*/#include#includeu原创 2011-09-18 11:41:52 · 404 阅读 · 0 评论 -
Superprime Rib
<br />Problem:<br /> Superprime Rib<br />Butchering Farmer John's cows always yields the best prime rib. You can tell prime ribs by looking at the digits lovingly stamped across them, one by one, by FJ and the USDA. Farmer John ensures that a purchaser of原创 2011-01-02 21:28:00 · 677 阅读 · 0 评论 -
Arithmetic Progressions
Problem: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 a non-negative integer and b is a positive integer. Write a program that finds all arithmetic progressio原创 2010-12-28 16:24:00 · 610 阅读 · 0 评论 -
The Clocks
Problem:The ClocksIOI'94 - Day 2Consider nine clocks arranged in a 3x3 array thusly: |-------| |-------| |-------| | | | | | | | |---O | |---O | | O | | | | | | |原创 2010-12-12 22:49:00 · 463 阅读 · 0 评论 -
Palindromic Squares
Problem:Palindromic SquaresRob Kolstad Palindromes are numbers that read the same forwards as backwards. The number 12321 is a typical palindrome. Given a number base B (2 Print both the number and its square in原创 2010-12-10 22:57:00 · 297 阅读 · 0 评论 -
Mixing Milk
Problem:Mixing MilkSince milk packaging is such a low margin business, it is important to keep the price of the raw product (milk) as low as possible. Help Merry Milk Makers get the milk they need in the cheapest possible manner. The Merry Milk Makers comp原创 2010-12-10 23:02:00 · 372 阅读 · 0 评论 -
Milking Cows
Problem:Milking CowsThree farmers rise at 5 am each morning and head for the barn to milk three cows. The first farmer begins milking his cow at time 300 (measured in seconds after 5 am) and ends at time 1000. The second farmer begins at time 700 and ends原创 2010-12-08 21:22:00 · 408 阅读 · 0 评论 -
Your Ride Is Here
Problem:Your Ride Is HereIt is a well-known fact that behind every good comet is a UFO. These UFOs often come to collect loyal supporters from here on Earth. Unfortunately, they only have room to pick up one group of followers on each trip. They do, ho原创 2010-12-08 20:25:00 · 276 阅读 · 0 评论 -
Broken Necklace
Problem:Broken NecklaceYou have a necklace of N red, white, or blue beads (3原创 2010-12-08 21:09:00 · 251 阅读 · 0 评论 -
Barn Repair
Problem:Barn RepairIt was a dark and stormy night that ripped the roof and gates off the stalls that hold Farmer John's cows. Happily, many of the cows were on vacation, so the barn was not completely full. The cows spend the night in stalls that are arran原创 2010-12-10 23:10:00 · 360 阅读 · 0 评论 -
Name That Number
Problem: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 this filing system, though, and wish to call the membe原创 2010-12-10 22:50:00 · 304 阅读 · 0 评论 -
Calf Flac
Problem:Calf Flac<br /><br />It is said that if you give an infinite number of cows an infinite number of heavy-duty laptops (with very large keys), that they will ultimately produce all the world's great palindromes. Your job will be to detect these bovin原创 2010-12-12 22:37:00 · 834 阅读 · 0 评论 -
Packing Rectangles
Problem:Packing RectanglesIOI 95The six basic layouts of four rectangles Four rectangles are given. Find the smallest enclosing (new) rectangle into which these four may be fitted without overlapping. By smallest rectangle, we mean the one with the smalles原创 2010-12-12 22:44:00 · 918 阅读 · 2 评论 -
Prime Cryptarithm
Problem:Prime CryptarithmThe following cryptarithm is a multiplication problem that can be solved by substituting digits from a specified set of N digits into the positions marked with *. If the set of prime digits {2,3,5,7} is selected, the cryptarithm is原创 2010-12-12 22:39:00 · 917 阅读 · 0 评论 -
Party Lamps
Problem:http://ace.delos.com/usacoprob2?a=GDaP3qeGiYp&S=lampsMy Answer:/*ID:iby071TASK:lampsLANG:C++*/#include#includeusin原创 2011-09-18 11:43:33 · 476 阅读 · 0 评论