
USACO
XMzhou
当你想要放弃的时候问问自己为什么坚持到了现在
展开
-
USACO 1.2.3
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原创 2013-05-15 20:50:23 · 40265 阅读 · 0 评论 -
USACO 1.3.5
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 pr原创 2013-05-29 21:10:49 · 773 阅读 · 0 评论 -
USACO 3.4.3 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原创 2013-09-16 16:28:20 · 787 阅读 · 0 评论 -
USACO 4.2.2 && POJ 1274 —— 二分图匹配
The Perfect StallTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 16733 Accepted: 7659DescriptionFarmer John completed his new barn just last week, compl原创 2013-10-31 03:44:05 · 816 阅读 · 0 评论 -
USACO 1.4.1 Packing Rectangles —— 暴力+ 模拟
Packing RectanglesIOI 95 The six basic layouts of four rectanglesFour rectangles are given. Find the smallest enclosing (new) rectangle into which these four may be fitted without overlapping.原创 2013-11-20 13:16:46 · 2012 阅读 · 0 评论 -
USACO 1.4.3 —— 暴搜
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.原创 2013-12-11 14:57:06 · 868 阅读 · 0 评论 -
USACO 1.4.2 —— 暴搜
The ClocksIOI'94 - Day 2Consider nine clocks arranged in a 3x3 array thusly:|-------| |-------| |-------| | | | | | | | |---O | |---O | | O |原创 2013-12-11 18:22:39 · 852 阅读 · 0 评论 -
USACO 1.5.1 —— DP
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原创 2013-12-12 09:06:36 · 767 阅读 · 0 评论 -
USACO 1.5.2 —— 打表暴力
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原创 2013-12-12 11:11:50 · 6251 阅读 · 0 评论 -
USACO 1.5.3 sprime ———— 暴枚 || DFS
Superprime RibButchering 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原创 2014-02-19 15:41:41 · 1012 阅读 · 0 评论 -
USACO 1.4.4
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原创 2013-05-30 20:43:22 · 876 阅读 · 0 评论 -
USACO 1.3.4
Calf FlacIt 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原创 2013-05-29 17:55:31 · 727 阅读 · 0 评论 -
USACO 1.3.3
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 ful原创 2013-05-22 18:37:45 · 771 阅读 · 0 评论 -
USACO 1.2.4
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 t原创 2013-05-16 16:29:19 · 837 阅读 · 0 评论 -
USACO 1.3.1
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原创 2013-05-16 18:14:56 · 628 阅读 · 0 评论 -
USACO 1.2.5
Dual PalindromesMario Cruz (Colombia) & Hugo Rickeboer (Argentina)A number that reads the same from right to left as when read from left to right is called a palindrome. The number 12321 is a pali原创 2013-05-16 16:41:21 · 789 阅读 · 0 评论 -
USACO 1.1.4 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原创 2013-05-03 21:53:05 · 680 阅读 · 0 评论 -
USACO 1.1.2 Greedy Gift Givers
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 fri原创 2013-04-29 21:49:01 · 742 阅读 · 0 评论 -
USACO 1.1.3 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 than on any other day of the week? To answer this question, wr原创 2013-04-30 16:32:18 · 678 阅读 · 0 评论 -
USACO 1.1.1 Your Ride Is Here
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原创 2013-04-27 16:26:24 · 673 阅读 · 0 评论 -
USACO 1.2.2 Transformations
TransformationsA square pattern of size N x N (1 <= N <= 10) black and white square tiles is transformed into another square pattern. Write a program that will recognize the minimum transformation原创 2013-05-04 01:21:43 · 819 阅读 · 0 评论 -
USACO 1.2.1 Milking Cows
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原创 2013-05-03 23:43:36 · 872 阅读 · 0 评论 -
USACO 1.5.4 Checker Challenge ———— DFS
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原创 2014-02-19 16:16:18 · 988 阅读 · 0 评论