sample input is giving correct output
code link: https://ide.codingblocks.com/s/92112
Run timr error in all test cases
In the Constraints section of the problem it is given that :-
Both M and N are between 1 to 10.
please somebody do reply
somebody please solve my this problem
You are not running the outer loop according to the column . Run outer loop for col , inner loop for row according to the value of col either even or odd.
I have corrected the code . Have a look at it .
It’s the same link you provided above.