While I was solving CNOTE, I set
bool = true and implemented the solution. The solution worked fine in my IDE but on Codechef IDE it threw WA. here’s the link to that solution: https://www.codechef.com/viewsolution/15904044
But when I changed bool to false and then implemented the same code, it got AC. Here’s the link: https://www.codechef.com/viewsolution/15904061.
Please help me in finding my mistake with the original solution.