I just found out that there's a demo of higher level competitions. So I tried the "gold division". Similarly there are 3 problems, and it is supposed to be finished in three hours if it was a competition.
First problem: destroying asteroids
There is a 2D grid and on some grid points lie asteroids. The spaceship has some weapon that is capable of destroying all the asteroids in a row or in a column. What's the least number of shots to clean out all the asteroids?
I'm too lazy to write the program, but it is fun to think. My solution used simple version of network flow to solve. First construct a graph in which each column or each row is represented by a point, and if there is a asteroid at the intersection, connect the two points. Create a "source " point and connect the source to all the column points. Finally construct a "sink" point and connect all the row points to the sink point. All the edges have capacity 1. The number of shots is just the maximum flow of the graph.
Second program: grazing on the run
This problem is in 1D. Basically there is food on some points, and the eater starts at some point who wants to eat all of them. However, there is a "staleness" of the food, and his traveling speed is fixed. The later he eats the food, the larger the staleness. What's the minimum total staleness to eat all of the food?
No clue yet....there could be a total of 1000 points that have food, so brute force search won't work. Ah, I think I got it. Dynamic programming? Wait, let me think more carefully....
Third problem: ....
I'm getting lazy so I'll just copy and paste the problem:
Farmer John has set up a puzzle for his cows to solve. At the
entrance to the barn, he has laid out an H x W (1 <= H <= 30, 1 <=
W <= 30) grid of letters. Before a cow can enter the barn, she
must spell out a valid English word by jumping from square to square,
creating a sequence of letters. She can start at any square but
may only jump to a subsequent square that is located to the right
and/or above the current square (i.e., neither to the left nor
lower). The next square can be any distance from the current one
since the cows are world-class jumpers!
No two cows may traverse the exact same path, although two cows are
allowed to spell the same word via different paths.
As an example, consider this grid (presuming 'TO' and 'OX' are
words):
T X X O
T X Q T
X T X Q
Four paths are valid, all spelling 'TO' (one spelling requires a
'T' from the bottom row and an 'O' from the top row). 'OX' is a
valid word, but would require jumping to an 'X' square left of the
'O', which is not allowed.
Given the grid and a list of valid words, compute the number of
cows that can enter the barn without any cow repeating a path. The
file `dict.txt' will be available and will contain the list of valid
words, one per line. See a copy of it at
http://ace.delos.com/usaco/dict-twalk.txt .
This is a dynamic programming problem, right? Just remember to re-use part of the word in constructing table for new words. For example with "abc" and "bbc", the "bc" table should be constructed only once.
That's about 40 minutes of thinking. I'm too lazy to test how long I will need to code though. I'm now a physics student, after all.