USACO Gateway Solution