HBC24149小宝排队[USACO 2016 Dec P]Lots of Triangles题解

凯凯我们等你回来 算法基础篇 46 0
题库丰富多样,涵盖各个领域,全网最全C++题库,让您在练习中不断成长!
Farmer John is thinking of selling some of his land to earn a bit of extra income. His property contains n trees , 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= such lots he can consider, based on all possible triples of trees on his property.A triangular lot has value v if it contains exactly v trees in its interior . For every v=0…N3, please help FJ determine how many of his L potential lots have value v.

Farmer John is thinking of selling some of his land to earn a bit of extra income. His property contains n 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, based on all possible triples of trees on his property. A triangular lot has value v if it contains exactly v 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 L potential lots have value v.

HBC24149小宝排队[USACO 2016 Dec P]Lots of Triangles题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: HBC24149小宝排队[USACO 2016 Dec P]Lots of Triangles题解