题目链接: Eureka Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description Professor Zhang draws n points on the plane, which are conveniently labeled by 1,2,...,n. The i-th point is at (xi,yi). Professor…
题目链接: How Many Triangles Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 570 Accepted Submission(s): 183 Problem Description Alice has n points in two-dimensional plane. She wants to know ho…
题意: 给出平面上n个点,问能在其中选出6个点,组成两个三角形,使得其互不相交 问有多少种选法 大致思路 考虑枚举一条直线,将所有得点分为左右两部分,其中有两个点在直线上, 以这两个点为顶点,分别统计左边有多少个三角形,右边有多少个三角形即可. 枚举直线时,枚举一个点,然后对其他点极角排序, 枚举另一个点,可快速算出该直线左右两边的点的数量(二分,叉积),组合一下即可. /* : . : i i . i : . i . i . i : . i . i i : . . . . . . . ..…
A point belongs to a triangle if it lies inside the triangle or on one of its sides. Two triangles are disjoint if there is no point on the plane that belongs to both triangles. You are given nn points on the plane. No two points coincide and no thre…