当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2839:Convex Hull and Triangle

Special Judge 特殊评判
题目描述
There are n points and m triangles in the plane. For each triangle, please compute the common area of the triangle and the polygon, which is the convex hull of the given n points:

输入解释
The first line of the input contains an integer number n, which is the number of the points. The follow n lines contain two integer numbers xi and yi, which describes the coordinate of each point. Then the next line contains an integer number m, which is the number of triangles, and there are 6 integer numbers axi, ayi, bxi, byi, cxi and cyi in each of the follow m lines, which describe the coordinate of vertices in a triangle.

We guarantee that n and m do not exceed 100000. The absolute value of integers appear above is not larger than 20000000.
输出解释
For each triangle in input, output the common area of the triangle and the convex hull in a single line. The result should be rounded to nearest integer number.
输入样例
5
0 0
0 2
2 0
2 2
1 1
2
3 3 3 4 4 3
2 0 2 4 0 2
输出样例
0
2

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-2839

最后修改于 2020-10-29T06:45:30+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
12000 131072