Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! ![]()
Edit:
I’m just going to assume that you meant this one:
https://www.codechef.com/viewsolution/32557221
in which case, consider the test input:
1
15
1 2 3 4 5 6 5 7 5 6 5 4 3 2 1