I was trying on the problem “Rupsa and the Game”. I found a algorithm for the answer and i coded it. I tested it with the example they gave and the answers matched. But when i submitted my solution it said the answers did not match.
Here is the link to my solution: https://www.codechef.com/viewsolution/14974347
Please, can somebody help me out.