摘要:
You are given a set of nn points in a 2D plane. No three points are collinear. A pentagram is a set of 55 points A,B,C,D,EA,B,C,D,E that can be arrang 阅读全文
摘要:
atan2是C++的一个很实用的函数,可以用于极角排序。 atan2(y,x)的值即为坐标为(x,y)的点与原点的连线和x轴正方向的夹角的弧度制。 极角排序排完以后,点从x负半轴开始,逆时针转一圈。 在极角排序的使用方法: int cmp(node x,node y){ if (atan2(x.y, 阅读全文