This problem doesn’t require much thought; it mainly tests geometry knowledge. Just enumerate directly. The formula for triangle area is:
S=21∣x1(y2−y3)+x2(y3−y1)+x3(y1−y2)∣
Assume these three points: the first point i is on the left side of the points array, the second point’s array position is between the two points, and the third point is on the right.