https://www.codechef.com/viewsolution/44339668

For the question spacearr (SPACEARR Problem - CodeChef) in long challenge march 2021 divison 3 , My idea is that if we find sum of n terms, and sum of the terms taken from the user, if their difference is positive and even then second player wins, if odd first player wins and if negative second player wins…

though my logic is correct in some cases, while it is not in other cases, why is that? could you suggest cases where my logic is wrong ?