[Topcoder] SRM 441 Div2 - Hard Permutations