Solve for usaco problems