Hey, so you’ve counted no. of 1s in a row. While you should do this for column as a boy’s choice (0 or 1) for each girl is described in a row. See my solution.
thanks for replying but can you tell me some example for which my code gives the wrong output
The correct output should be 1 but your code gives 0.