I can see that this problem needs an alternative interpretation in terms of game theory, but I’m unable to transform the problem statement to such an interpretation.
I also tried doing this.
My submission : link
Sample Input gave correct answer, but it is giving WA. I also need help.