You are given a two dimensional array points of size n, where points[i] = [x_i, y_i] represents the coordinates of the
You need to select a pair of distinct people, placing Alice at point
Alice is at the upper left position relative to Bob, meaning
No other person is located strictly inside or on the boundary of the rectangular region defined by Alice and Bob as opposite corners. Specifically, there is no third person at point
Return the total number of valid pairs of people
Note: The rectangular region may have an area of
, which occurs when or .
Constraints:
n n is the length of points
points[i].length
points[i][0], points[i][1]
All points[i] are distinct.
You are given a two dimensional array points of size n, where points[i] = [x_i, y_i] represents the coordinates of the
You need to select a pair of distinct people, placing Alice at point
Alice is at the upper left position relative to Bob, meaning
No other person is located strictly inside or on the boundary of the rectangular region defined by Alice and Bob as opposite corners. Specifically, there is no third person at point
Return the total number of valid pairs of people
Note: The rectangular region may have an area of
, which occurs when or .
Constraints:
n n is the length of points
points[i].length
points[i][0], points[i][1]
All points[i] are distinct.