Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
For each <code>(x, y)</code>, find <code>(m - 1 - x, y)</code>, <code>(m - 1 - x, n - 1 - y)</code>, and <code>(x, n - 1 - y)</code>; they should be the same.
Note that we need to specially handle the middle row (column) if the number of rows (columns) is odd.
Solve with full IDE support and test cases