Codechef Starter RISK

CodeChef: Practical coding for everyone

Can someone tell me why I’m getting Runtime Error on Test1

1 Like

probably because you’re using the check method on a cell out of bounds. try with a test case with with a “1” along the boundary

1 Like


So how can I correct my code? Also it has given RE in just 0.02sec

Either write iteratively or the article which I linked has method to increase stack size.

Thanks man it worked