Topcoder TheSwap problem