The first line of the path is always 1 1 .
The last line is always M N. your solution can not be evaluated !
the first line of the path is always 1 1 and the last line is always M N. your solution can not be evaluated !