apple pie's submission of Permutation Xority | CodeChef