usaco beads