Absolute Permutation Hackerrank Solution Cpp