CODECHEF Permutation GCD Problem Solution
in this Codechef Permutation GCD problem solution Chef wants to find a permutation of {1, 2, ldots, N}{1,2,…,N} which has the given sum equal to XX. Please help Chef find one such permutation. In case there is no such permutation, print -1−1. In case of multiple answers, any of them will be accepted. CODECHEF Permutation…