According to the solution for a particular cow at (x,y) we are looping through all the fences from for i<n: for j<n: (xi+1,yj+1) but when I tried to just use the fences (xi+1,yi+1) the solution is showing wrong and I am not able to understand the reason. Can anyone tell me why my idea is failing?
1 Like