solution for usaco training problems