- 博客(12)
- 收藏
- 关注
原创 My USACO Analysis:Friday the Thirteenth
This is a typical Brute Force.Theres nothing to say because this is so easy!All you need is to notice the details.program friday(input,output);const monthday:array[1..12]of byte=(3,0,3,2,3,2,3,3
2007-04-20 23:05:00
527
转载 Analysis:Friday the Thirteenth
Brute force is a wonderful thing. 400 years is only 4800 months, so it is perfectly practical to just walk along every month of every year, calculating the day of week on which the 13th occurs for ea
2007-04-20 23:01:00
623
转载 Friday the Thirteenth
Is 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, write a program that will c
2007-04-20 22:57:00
473
原创 My USACO Analysis:Greedy Gift Givers
To record the names,I used an array of string.And I used another one to save the numbers that should be printed out.This is also an sd hoc problem-as easy as it could be!program gift1(input,outp
2007-04-20 22:55:00
527
转载 Analysis:Greedy Gift Givers
The hardest part about this problem is dealing with the strings representing peoples names. We keep an array of Person structures that contain their name and how much money they give/get. The h
2007-04-19 22:48:00
374
转载 Greedy Gift Givers
A 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 friends. Likewise, each
2007-04-19 22:45:00
325
转载 Ad Hoc Problems
`Ad hoc problems are those whose algorithms do not fall into standard categories with well-studied solutions. Each ad hoc problem is different; no specific or general techniques exist to solve them
2007-04-18 21:51:00
850
原创 My USACO Analysis:Your Ride Is Here
Here is my own solution in PASCAL:program ride(input,output);const a:array[A..Z]of integer=(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26);var s:string; l,i,sum1,sum2
2007-04-18 21:50:00
431
转载 Analysis: Your Ride Is Here
This is probably the easiest problem in the entire set of lessons. An `ad hoc problem, no particular algorithms or tricks are needed save one: one must be careful to get all 72 characters of input
2007-04-18 21:45:00
548
转载 Your Ride Is Here
Your Ride Is Here It 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 o
2007-04-18 21:42:00
477
转载 Programming Contest Problem Types
Programming Contest Problem TypesHal Burch conducted an analysis over spring break of 1999 and made an amazing discovery: there are only 16 types of programming contest problems! Furthermore, the t
2007-04-18 21:40:00
409
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人