help in Asia-amritapuri ACM ICPC regionals problem
how are we supposed to solve this problem?
https://www.codechef.com/AMR16MOS/problems/AMR16J