11168专题

uva 11168 Airport

原题: There is a small town with n houses. The town needs an airport. An airport is basically a very long, very straight road. Think of it as an infinite line. We need to build the airport such that t

uva 11168 凸包

void getLineGeneralEquation(const Point& p1, const Point& p2, double& a, double& b, double &c){a = p2.y - p1.y;b = p1.x - p2.x;c = -a * p1.x - b * p1.y;} 把直线的两点式转化为一般式,恩,没什么要注意的。 #inclu