首页 > TAG信息列表 > QOJ3225

QOJ3225 Snake

等价于对于折线每个端点,都能找到一条直线使得所有之前和之后的点分立两侧,在每个点处极角排序 + 双指针即可。 #include <stdio.h> #include <algorithm> typedef long long ll; const int MAXN = 1010; int n, tot; struct point{ ll x, y; int id; }; point a[MAXN], b