跳至正文

USACO 3.1 Score Inflation 总分 解题报告

Score Inflation

The 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 like your assistance.

We have several categories from which probl[……]

继续阅读

USA 3.1 Agri-Net 最短网络 解题报告

Agri-Net
Russ Cox
Farmer 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 John ordered a high speed connection for his farm and is going to[……]

继续阅读

USACO 2.4 Bessie Come Home 回家 解题报告

Bessie Come Home
Kolstad & Burch
It’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 one cow gets to the barn first (the supplied test data wi[……]

继续阅读

USACO Longest Prefix最长前缀 解题报告

Longest Prefix
IOI’96
The structure of some biological objects is represented by the sequence of their constituents denoted by uppercase letters. Biologists are interested in decomposing a long sequence into shorter ones called primitives.

We say that a sequen[……]

继续阅读

USACO 2.3 Zero Sum 零的算式和 解题报告

Zero Sum

Consider 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 digits together between each pair of digits (not in front of the f[……]

继续阅读

USACO 2.3 Cow Pedigrees 奶牛家谱 解题报告

Farmer 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 can easily be represented by one or more binary trees with a total of N (3 <= N < 200) nodes. The tr[……]

继续阅读

USACO 2.3 Money Systems 货币系统 解题报告

Money Systems

The 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. Traditionally, coins come in values like 1, 5, 10, 20 or 25, 50, and[……]

继续阅读