| 6 | return a.z < b.z; } |
| 7 | point3d slp; |
| 8 | bool cmpsl(const point3d& a, const point3d& b) { |
| 9 | point3d ad = a-slp, bd = b-slp; |
| 10 | return atan2(ad.y, sqrt(ad.x*ad.x + ad.z*ad.z)) < |
| 11 | atan2(bd.y, sqrt(bd.x*bd.x + bd.z*bd.z)); } |
| 12 | set<vi> gift_wrap(vector<point3d> points) { |
| 13 | int n = points.size(), lowi = 0, lowj = 0; |
| 14 | set<vi> res; set<ii> vis; queue<ii> q; |