Solution 1 geometry + hash

  • t-complexity: $O(n)$

  • s-complexity: $O(n)$

  1. the large rectangle area should be equal to the sum of small rectangles

  2. count of all the points should be even, and that of all the four corner points should be one

Last updated