农民约翰正在考虑卖掉他的一部分土地以赚取一点额外收入。
他的土地中一共种植了 N 棵树,每棵树用二维平面上的一个点来描述,没有任何三棵树是共线的。
约翰正在考虑选取其中三棵树作为顶点,将其围成的三角形区域土地出售。
他一共可以在自己的土地上找出 L=(3N) 个不同的由三棵树作为顶点构成的三角形区域。
如果一个三角形区域的内部包含 v 棵树,那么这个三角形区域的价值就是 v。
注意,位于顶点的树不计算在内,并且由于没有三棵树是共线的,所以三角形边上也不可能有树。
对于每一个 v=0…N−3,帮助约翰确定在所有 L 个可选三角形区域中,价值为 v 的有多少个。
第一行包含整数 N。
接下来 N 行,每行包含两个整数 x,y,表示一棵树在二维平面中的横纵坐标。
共 N−2 行,第 i 行输出价值为 i−1 的三角形区域的个数。
3≤N≤300
Farmer John is thinking of selling some of his land to earn a bit of extra income. His property contains nn trees (3≤N≤300), each described by a point in the 2D plane, no three of which are collinear. FJ is thinking about selling triangular lots of land defined by having trees at their vertices; there are of course L=(N3) such lots he can consider, ba
A triangular lot has value vv if it contains exactly vv trees in its interior (the trees on the corners do not count, and note that there are no trees on the boundaries since no three trees are collinear). For every v=0…N−3, please help FJ determine how many of his LL potential lots have value v.
7 3 6 17 15 13 15 6 12 9 1 2 7 10 19
28 6 1 0 0
Problem credits: Lewin Gan