Please Can any body explain "The Last Problem" question

Anybody please explain “The Last Problem” of may cook off as i am totally confused.
https://www.codechef.com/COOK129C/problems/TLAPM

Just go down and right