Reduction Game | Please share the approaches who have solved it.

Problem Link - CodeChef: Practical coding for everyone
Problem Code: REDCGAME

https://discuss.codechef.com/questions/138614/acmind18-icpc-online-round-solution-outlines

I have not understood the solution here that’s why I asked this question separately

Okay. Which part(s) did you not understand specifically?