#P1715. Counting Triangular Lots
Counting Triangular Lots
Counting Triangular Lots
Farmer John is considering selling triangular lots of land defined by having trees at their vertices. His property contains \(N\) trees in the 2D plane, with no three trees being collinear. There are \(L = \binom{N}{3}\) possible triangular lots. A triangular lot has value \(v\) if it contains exactly \(v\) trees in its interior (the trees at the vertices do not count). For every \(v = 0,1,\dots, N-3\), compute the number of triangular lots that have value \(v\).
Note: Since no three trees are collinear, no tree lies on the boundary of any triangle.
inputFormat
The first line contains an integer \(N\) (\(3 \le N \le 300\)). Each of the next \(N\) lines contains two space-separated integers representing the coordinates of a tree. It is guaranteed that no three trees are collinear.
outputFormat
Output \(N-2\) lines. The \(i\)th line (starting from \(0\)) should contain the number of triangular lots that have value \(i\), that is, exactly \(i\) trees strictly inside the triangle.
sample
3
0 0
1 0
0 1
1
</p>