Problem: https://usaco.org/index.php?page=viewproblem2&cpid=919
A Solution and Explanation: https://activities.tjhsst.edu/sct/lectures/1819/2019_3_8_February_USACO_Review.pdf
Implementation: Solution - Painting the Barn (USACO Silver 2019 February)
For this solution, -1’s are put at A[x1][y2] and A[x2][y1j]. But does this not kill all of the possible solutions on the row/column that the -1’s are placed, as the line of elements that the corners of the rectangle are connected to are also possible solutions? Shouldn’t these -1’s be placed 1 row and column over?
I feel like I’m missing something big, please help!