Find the Number of Ways to Place People II
Sort the points by column, then sweep each upper-left point rightward, counting a lower-right point when no earlier point blocks its fence.
Sort the points by column, then sweep each upper-left point rightward, counting a lower-right point when no earlier point blocks its fence.