Testcase 0 not working

I am not able to get all the test cases right. Please check my code.

Code Link: https://ide.codingblocks.com/s/413688
Problem Link: https://hack.codingblocks.com/app/practice/1/288/problem

hello @Dancool32

instead of handling so many cases in each if, simply put one if statement at the top that keeps check of invalid cell.

refer this->link

Thanks a lot. Working now.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.