This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Point = pair<int,int>; | |
ll cross(const Point& a, const Point& b) { | |
return 1ll * a.first * b.second - 1ll * a.second * b.first; | |
} | |
// 逆时针 | |
// 参考 mnbvmar 的写法:https://codeforces.com/contest/1284/submission/68178688 | |
bool cmp_polar(const Point& a, const Point& b) { | |
bool aorig = a.second > 0; | |
bool borig = b.second > 0; | |
if (aorig != borig) { |