百度首页 | 百度空间
 
文章列表
 
您正在查看 "Usaco" 分类下的文章

2008-10-06 18:03

Hidden Password

ACM South Eastern Europe -- 2003

Sometimes the programmers have very strange ways of hiding their passwords. Billy "Hacker" Geits chooses a string S composed of L (5 <= L <= 100,000) lowercase letters ('a'..'z') with length L. Then he makes and sorts all L-1 one-letter left cyclic shifts of the string. He then takes as a password one prefix of the lexicographically first of the obtained strings (includin

类别:Usaco | 评论(0) | 浏览()
 
2008-10-05 21:58
Betsy's Tour
Don Piele

A square township has been divided up into N2 square plots (1 <= N <= 7). The Farm is located in the upper left plot and the Market is located in the lower left plot. Betsy takes her tour of the township going from Farm to Market by walking through every plot exactly once. Shown below is one possible tour for Betsy when N=3.

----------------
|    |    
类别:Usaco | 评论(2) | 浏览()
 
2008-10-04 10:08
Character Recognition

This problem requires you to write a program that performs character recognition.

Each ideal character image has 20 lines of 20 digits. Each digit is a `0' or a `1'. See Figure 1a (way below) for the layout of character images in the file.

The file font.in contains representations of 27 ideal character images in this order:

_abcde

类别:Usaco | 评论(0) | 浏览()
 
2008-10-03 21:59
Canada Tour

You have won a contest sponsored by an airline. The prize is a ticket to travel around Canada, beginning in the most western point served by this airline, then traveling only from west to east until you reach the most eastern point served, and then coming back only from east to west until you reach the starting city. No city may be visited more than once, except for the starting city, which must be visited

类别:Usaco | 评论(0) | 浏览()
 
2008-10-03 16:35
All Latin Squares

A square arrangement of numbers

1  2  3  4  5
2  1  4  5  3
3  4  5  1  2
4  5  2  3  1
5  3  1  2  4
is a 5 x 5 Latin Square because each whole number from 1 to 5 appears once and only once in each row and column.

Write a program that will compute the number of NxN Latin Squares whose first row is:

1 2 3 4 5.......N
Your program should work for any N from 2 to 7.

PROGRAM

类别:Usaco | 评论(0) | 浏览()
 
2008-09-17 08:08
Big Barn
A Special Treat

Farmer John wants to place a big square barn on his square farm. He hates to cut down trees on his farm and wants to find a location for his barn that enables him to build it only on land that is already clear of trees. For our purposes, his land is divided into N x N parcels. The input contains a list of parcels that contain trees. Your job is to determine and report the large

类别:Usaco | 评论(0) | 浏览()
 
2008-09-15 20:56
Milk Measuring
类别:Usaco | 评论(0) | 浏览()
 
2008-09-15 14:15
Wisconsin Squares

It's spring in Wisconsin and time to move the yearling calves to the yearling pasture and last year's yearlings to the greener pastures of the north 40.

Farmer John has five kinds of cows on his farm (abbreviations are shown in parentheses): Guernseys (A), Jerseys (B), Herefords (C),

类别:Usaco | 评论(0) | 浏览()
 
2008-09-13 00:26
Electric Fences
Kolstad & Schrijvers

Farmer John has decided to construct electric fences. He has fenced his fields into a number of bizarre shapes and now must find the optimal place to locate the electrical supply to each of the fences.

A single wire must run from some point on each and every fence to the source of electricity. Wires can run through other fences or across other wires. Wire

类别:Usaco | 评论(0) | 浏览()
 
2008-09-12 20:13
Snail Trails
All Ireland Contest

Sally

类别:Usaco | 评论(0) | 浏览()
 
     
 
 
文章分类
 
 
Usaco(61)
 
 
 
 
 
     
 
文章存档
 
 
 
 
 
 
 
 
 
     
 
最新文章评论
   
 

Bless to you!!
 
 

好运!
 

Luckly!
 
     


©2008 Baidu