What is wrong in this code Problem-Prefix Sums

Here is the code it says that it fails for test case n=6 , but n=6 is not possible here. Pls HELP

CodeChef | Competitive Programming | Participate & Learn

Your code actually fails for n=8, and its output:

1 3 5 8 
2 4 6 7 

This does not meet the conditions \sum\limits a=\sum\limits b.
\sum\limits a=17 and \sum\limits b=19.