MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / point

Class point

code/geometry/rmst.cpp:3–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#define MAXN 100100
2struct RMST {
3 struct point {
4 int i; ll x, y;
5 point() : i(-1) { }
6 ll d1() { return x + y; }
7 ll d2() { return x - y; }
8 ll dist(point other) {
9 return abs(x - other.x) + abs(y - other.y); }
10 bool operator <(const point &other) const {
11 return y == other.y ? x > other.x : y < other.y; }
12 } best[MAXN], arr[MAXN], tmp[MAXN];
13 int n;
14 RMST() : n(0) {}
15 void add_point(int x, int y) {

Callers 12

distMethod · 0.70
testFunction · 0.70
testFunction · 0.70
checkFunction · 0.70
closest_pairFunction · 0.70
testFunction · 0.70
welzlFunction · 0.70
rotateFunction · 0.70
normalizeFunction · 0.70
perpFunction · 0.70
polygon_centroidFunction · 0.70
testFunction · 0.70

Calls

no outgoing calls

Tested by 5

testFunction · 0.56
testFunction · 0.56
checkFunction · 0.56
testFunction · 0.56
testFunction · 0.56