last USACO

<p>I competed in the silver division of the last USACO competition in December. I have a solution to two of the gold division challenges, but I'm having problems with the third. Does anyone know if and when the analysis will be posted?</p>

<p>which was the third
the one with the ski tracks ?
I know how to solve the three of them</p>

<p>ya that one</p>

<p>they don't post the solutions</p>

<p>briefly,
the algo is to represent the whole area as a graph
each square is a vertex.
if a cow can ski from a square to a neighbouring sqaure then there is an edge from the first to the second vertex.
Build the graph and find its strongly connected components, shrink the graph so that each strongly connected component is a single vertex. then find the number of those vertice that do not have an incoming edge and the number of those that do not have an outgoing edge. The answer is the maximum of these two numbers.</p>

<p>This can be done the following way more easily.
find those areas of equal heights that all neighbouring areas are higher and those that neighbouring areas are lower.
the answer is the maximum of the two numbers.
I can't prove this, but i was sure it worked</p>

<p>haha thanks, that second one is crazy if it does work. I love coming up with unique solutions because then I feel cool, but 90% of the time I'm disappointed because i get all the test cases with that solution except for 1 or 2!</p>