https://ide.codingblocks.com/s/53977
Only two test cases failed. What condition is missing here?
Hey Harshita, check your code for this case:
input:
10
1 1 1 1 1 1 1 1 1 1
0 0 1 1 1 1 1 0 0 0
0 0 0 0 1 1 0 0 0 0
0 1 1 0 0 0 0 0 0 0
0 1 1 1 1 1 1 0 0 0
0 0 0 0 1 1 0 0 0 0
0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1
your code’s output:
7
but the expected output:
17
Thank You Sanjeet
Seems like i am misinterpreting the question.
Can you help me comprehend it?