Help in Question MINIMAX2 (Game of Theory)

Hi,
I wrote and submitted my solution for the question MINIMAX2, my submission link is MyAnswer. Anyone please point out the problem, it is giving WA. It gave correct output for sample input.
Thanks in Advance :grin: