Approach hintTry it first, then revealHide
Move both robots down one row at a time, so the state is (row, col1, col2) with nine transitions. Count a cell only once when both robots stand on it. O(m * n^2).
Move both robots down one row at a time, so the state is (row, col1, col2) with nine transitions. Count a cell only once when both robots stand on it. O(m * n^2).