HDU 1700 || Points on Cycle (向量旋转,圆上等边三角形的周长最长

题目大意:

以原点为中心的一个圆,给你圆上的一点,让你求出另外圆上的两点,让着三点连线组成的三角形的周长最长。

        要周长最长,那么就把问题转化为,给你一点在圆上画等边三角形。

        输入点P,那么点P逆时针旋转120°,顺时针旋转120°就是要求的亮点。


注意:

这题没有特判,我一开始用p点旋转成P1点在用P1点选择成P2点,死WA,换了一下就A了。

#include 
#include 
#include 
using namespace std;
const double eps = 1e-8;
const double PI = acos(-1.0);
struct pnode{

    double x,y;
    pnode(double xx=0.0,double yy=0.0):x(xx),y(yy){}
    bool operator < (const pnode &b)const{
        return y


你可能感兴趣的:(water,计算几何)