So I’ve failed to come up with a testcase of fill the matrix for which my code fails. I have got correct only for the 2nd subtask. The logic I have used is, if a cycle is found and the no. of 1’s in the cycle is odd, answer is “no” else the answer is yes.
Here is my code- https://www.codechef.com/viewsolution/15330674
I want to know a testcase for which my solution fails. Thanks in advance.