RAINBOWA - Editorial

Hello can anyone point out the error in the given code. I have understood the question , but cant find out the error…it seems alright to me.
https://www.codechef.com/viewsolution/21937334
Thanks

Can I directly say by N that if N is even the answer is “no” and for Odd N I will check the condition ?

Can someone point out where am I going wrong https://www.codechef.com/viewsolution/23252213

Can someone point out where am I going wrong https://www.codechef.com/viewsolution/23252213

Note: this tc is not included, after submitting check for this too

1
15
2 2 2 3 4 5 6 7 6 5 4 3 2 2 2

ans: no