幾何
code:cpp
struct Point {
int x, y;
explicit Point(const int x = 0, const int y = 0): x(x), y(y) {}
bool operator < (const Point& other) const {
return x < other.x or (x == other.x and y < other.y);
}
Point operator - (const Point& other) const {
return Point(x - other.x, y - other.y);
}
};
int cross(const Point& p, const Point& q) {
return p.x * q.y - p.y * q.x;
}