![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
USACO
zrw93
这个作者很懒,什么都没留下…
展开
-
USACO 2.3.5 Controlling Companies
Some companies are partial owners of other companies because they have acquired part of their total shares of stock. For example, Ford owns 12% of Mazda. It is said that a company A controls company B原创 2012-08-17 15:41:29 · 107 阅读 · 0 评论 -
USACO 3.1.4 Shaping Regions
Shaping RegionsN opaque rectangles (1 <= N <= 1000) of various colors are placed on a white sheet of paper whose size is A wide by B long. The rectangles are put with their sides parallel to the s原创 2013-01-27 12:09:07 · 455 阅读 · 2 评论 -
USACO 3.1.5 Contact 动态规划
ContactIOI'98The cows have developed a new interest in scanning the universe outside their farm with radiotelescopes. Recently, they noticed a very curious microwave pulsing emission sent right fr原创 2013-01-28 16:15:10 · 223 阅读 · 0 评论 -
USACO 2.1.5 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 sorted have at mo原创 2013-01-15 14:18:42 · 198 阅读 · 0 评论 -
USACO 3.2.3 Stringsobits 动态规划
StringsobitsKim SchrijversConsider an ordered set S of strings of N (1 This set of strings is interesting because it is ordered and contains all possible strings of length N that have L (1 You原创 2013-01-30 18:19:59 · 127 阅读 · 0 评论 -
USACO 3.2.5 Feed Ratios 待考
Feed Ratios1998 ACM Finals, Dan AdkinsFarmer John feeds his cows only the finest mixture of cow food, which has three components: Barley, Oats, and Wheat. While he knows the precise mixture of the原创 2013-02-01 12:09:45 · 127 阅读 · 0 评论 -
USACO 3.2.6 Magic Squares 再做一遍
/*ID:zhaorui3PROG:msquareLANG:C++*/#include #include #include #include #include using namespace std;struct Node{ Node(string _st,string _str,int _d){ st = _st; str = _str; d=_d; }原创 2013-02-03 11:10:47 · 135 阅读 · 0 评论 -
USACO 3.2.7 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 <=原创 2013-02-04 14:40:26 · 259 阅读 · 0 评论 -
USACO 2.2.4 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:{3}原创 2013-01-19 21:58:22 · 969 阅读 · 1 评论 -
USACO 2.3.1 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 de原创 2013-01-20 23:22:25 · 296 阅读 · 0 评论 -
USACO 2.3.4 Money Systems 动态归划
Money SystemsThe cows have not only created their own government but they have chosen to create their own money system. In their own rebellious way, they are curious about values of coinage. Tradi原创 2013-01-22 16:16:22 · 323 阅读 · 0 评论 -
USACO 3.3.2 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原创 2013-02-06 17:02:47 · 220 阅读 · 0 评论 -
USACO 3.3.3 Shopping 再做一遍
/*ID:zhaorui3PROG:shoppingLANG:C++*/# include # include # include using namespace std;struct Discount{ int cost , k[1002];};Discount disArr[102];struct Buy{ int high , buy , p;};Bu原创 2013-02-08 16:47:00 · 148 阅读 · 0 评论 -
USACO 2.3.3 Zero Sum 深搜
Zero SumConsider the sequence of digits from 1 through N (where N=9) in increasing order: 1 2 3 ... N.Now insert either a `+' for addition or a `-' for subtraction or a ` ' [blank] to run the di原创 2013-01-22 11:31:43 · 625 阅读 · 0 评论 -
USACO 3.1.3 Humble Numbers
Humble NumbersFor a given set of K prime numbers S = {p1, p2, ..., pK}, consider the set of all numbers whose prime factors are a subset of S. This set contains, for example, p1, p1p2, p1p1, and原创 2012-09-14 19:00:12 · 218 阅读 · 0 评论 -
USACO 3.1.2 Score Inflation 完全背包问题
Score InflationThe more points students score in our contests, the happier we here at the USACO are. We try to design our contests so that people can score as many points as possible, and would li原创 2012-09-12 22:42:02 · 479 阅读 · 0 评论 -
USACO 2.3.4 Money Systems
Money SystemsThe cows have not only created their own government but they have chosen to create their own money system. In their own rebellious way, they are curious about values of coinage. Tradi原创 2012-08-17 19:34:56 · 138 阅读 · 0 评论 -
USACO 2.3.3 Zero Sum
Zero SumConsider the sequence of digits from 1 through N (where N=9) in increasing order: 1 2 3 ... N.Now insert either a `+' for addition or a `-' for subtraction or a ` ' [blank] to run the di原创 2012-08-17 19:47:02 · 95 阅读 · 0 评论 -
USACO 2.4.3 Cow Tours
Cow ToursFarmer John has a number of pastures on his farm. Cow paths connect some pastures with certain other pastures, forming a field. But, at the present time, you can find at least two pasture原创 2012-08-17 19:06:44 · 298 阅读 · 0 评论 -
USACO 2.4.1 The Tamworth Two
The Tamworth TwoBIO '98 - Richard ForsterA pair of cows is loose somewhere in the forest. Farmer John is lending his expertise to their capture. Your task is to model their behavior.The chase ta原创 2012-08-17 10:26:18 · 146 阅读 · 0 评论 -
USACO 2.4.2 Overfencing
原题如下:Farmer John went crazy and created a huge maze of fences out in a field. Happily, he left out two fence segments on the edges, and thus created two "exits" for the maze. Even more happily, the原创 2012-08-16 14:39:17 · 215 阅读 · 0 评论 -
USACO 2.4.4 Bessie Come Home
Bessie Come HomeKolstad & BurchIt's dinner time, and the cows are out in their separate pastures. Farmer John rings the bell so they will start walking to the barn. Your job is to figure out which原创 2012-08-18 11:48:11 · 176 阅读 · 0 评论 -
USACO 2.4.5 Fractions to Decimals
Fractions to DecimalsWrite a program that will accept a fraction of the form N/D, where N is the numerator and D is the denominator and print the decimal representation. If the decimal representat原创 2012-08-18 17:23:29 · 85 阅读 · 0 评论 -
USACO 3.1.1 Agri-Net
Agri-NetRuss CoxFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course.Farmer Joh原创 2012-09-11 18:20:27 · 148 阅读 · 0 评论 -
USACO 2.3.5 Controlling Companies
Controlling CompaniesSome companies are partial owners of other companies because they have acquired part of their total shares of stock. For example, Ford owns 12% of Mazda. It is said that a com原创 2013-01-22 20:26:56 · 327 阅读 · 0 评论 -
USACO 2.4.2 Overfencing 广搜
OverfencingKolstad and SchrijversFarmer John went crazy and created a huge maze of fences out in a field. Happily, he left out two fence segments on the edges, and thus created two "exits" for the原创 2013-01-23 20:24:04 · 173 阅读 · 0 评论 -
USACO 2.4.4 Bessie Come Home Dijkstra算法
Bessie Come HomeKolstad & BurchIt's dinner time, and the cows are out in their separate pastures. Farmer John rings the bell so they will start walking to the barn. Your job is to figure out which原创 2013-01-24 15:37:13 · 173 阅读 · 0 评论 -
USACO 2.4.5 Fractions to Decimals 不知道什么算法
Fractions to DecimalsWrite a program that will accept a fraction of the form N/D, where N is the numerator and D is the denominator and print the decimal representation. If the decimal representat原创 2013-01-24 16:48:46 · 145 阅读 · 0 评论 -
USACO 3.1.1 Agri-Net Kruskal版本
Agri-NetRuss CoxFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course.Farmer Joh原创 2013-01-24 22:18:25 · 183 阅读 · 0 评论 -
USACO 2.3.2 Cow Pedigrees 还是动态规划
Cow PedigreesSilviu Ganceanu -- 2003Farmer John is considering purchasing a new herd of cows. In this new herd, each mother cow gives birth to two children. The relationships among the cows ca原创 2013-01-21 19:08:25 · 457 阅读 · 0 评论