标签:code void -- amp ons operator while color point
struct point{ ll x,y; point operator + (const point &k1) const{return (point){k1.x+x,k1.y+y};} point operator - (const point &k1) const{return (point){x-k1.x,y-k1.y};} }; ll cross(point k1,point k2){return k1.x*k2.y-k1.y*k2.x;} point q[N]; int head,tail; void pop(ll k){ while(tail>head && q[head+1].y-q[head].y<=k*(q[head+1].x-q[head].x)) head++; } void push(point k1){ while(tail>head && cross(q[tail]-k1,q[tail-1]-k1)>=0)tail--; q[++tail]=k1; }
标签:code void -- amp ons operator while color point
原文地址:https://www.cnblogs.com/zsben991126/p/12520440.html