CVW - Editorial

PROBLEM LINK:

https://www.codechef.com/COWS2016/problems/CVW

Author: acesprime
Tester: acesprime
Editorialist: acesprime

DIFFICULTY:

MEDIUM.

PREREQUISITES:

Array

PROBLEM:

Problem is to arrange numbers from 1 to N in such a way that absolute value of difference of the ith number from the position of ith number in the arrangement , to be equal to a certain value K.

AUTHOR’S AND TESTER’S SOLUTIONS:

http://ideone.com/GU7uLE