
USACO
文章平均质量分 81
lele_gemini
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
1.2.1---Milking Cows
Milking Cows Three farmers riseat 5 am each morning and head for the barn to milk three cows. The first farmerbegins milking his cow at time 300 (measured in seconds after 5 am) and ends attime 1000.原创 2013-04-05 17:55:27 · 356 阅读 · 0 评论 -
2.1.2---Ordered Fractions
Consider the set of all reduced fractions between 0 and 1 inclusive with 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/5 1/1 Write a progr原创 2013-05-01 14:59:04 · 481 阅读 · 0 评论 -
2.2.1---Preface Numbering
A 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 is the standard set:原创 2013-05-01 17:10:43 · 479 阅读 · 0 评论 -
2.1.3---Sorting a Three-Valued Sequence
Sorting is one of the most frequently performed computational tasks. Consider the special sorting problem in which the records to be sorted have at mostthree different key values. This happens for ins原创 2013-04-30 16:30:48 · 430 阅读 · 0 评论 -
2.1.4---Healthy Holsteins
Farmer John prides himself on having the healthiest dairy cows in the world. He knows the vitamin content for one scoop of each feed type and the minimum daily vitamin requirement for the cows. Help F原创 2013-05-01 13:08:17 · 539 阅读 · 0 评论 -
2.1.5---Hamming Codes
Given 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 codewords is at least Hamming distance of D (1 <= D <= 7) away from each of the原创 2013-05-01 14:54:04 · 555 阅读 · 0 评论 -
1.5.1---Number Triangles
Consider 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原创 2013-04-23 10:48:28 · 399 阅读 · 0 评论 -
1.4.2---The Clocks
The Clocks IOI'94 - Day 2 Consider nine clocks arranged in a 3x3 array thusly: |-------| |-------| |-------| | | | | | | | |---O | |---O | | O |原创 2013-04-20 11:08:04 · 512 阅读 · 0 评论 -
1.4.4---Mother's Milk
Farmer 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 while bucket C is原创 2013-04-23 10:10:39 · 480 阅读 · 0 评论 -
1.1.1---Greedy Gift Givers
Greedy Gift Givers A group of NP (2 ≤ NP ≤ 10)uniquely named friends has decided to exchange gifts of money. Each of thesefriends might or might not give some money to any or all of the other friends原创 2013-04-05 18:07:32 · 451 阅读 · 0 评论 -
1.2.3---Name That Number
Among 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, th原创 2013-04-05 22:06:30 · 363 阅读 · 0 评论 -
1.3.2---Barn Repair
Barn Repair It 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 ful原创 2013-04-08 22:01:36 · 426 阅读 · 0 评论 -
1.4.3---Arithmetic Progressions
An 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原创 2013-04-21 18:04:53 · 500 阅读 · 0 评论 -
1.5.3---Superprime Rib
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原创 2013-04-24 19:42:39 · 509 阅读 · 0 评论 -
1.5.4---Checker Challenge
Examine 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 diag原创 2013-04-25 20:28:20 · 416 阅读 · 0 评论 -
2.1.1---The Castle
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 th原创 2013-04-30 13:35:16 · 390 阅读 · 0 评论 -
1.1.2---Friday the Thirteenth
Friday the Thirteenth Is Friday the 13th really an unusual event? That is, does the 13th of the month land ona Friday less often than on any other day of the week? To answer this question,write a pr原创 2013-04-04 17:21:25 · 399 阅读 · 0 评论 -
1.2.4---Palindromic Squares
Palindromes 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 the integers N (1 <= N <= 300 bas原创 2013-04-05 22:38:22 · 400 阅读 · 0 评论 -
2.2.2---Subset Sums (01)
For 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: {3} and {1,2} This原创 2013-06-01 14:45:19 · 398 阅读 · 0 评论