MCPcopy Create free account
hub / github.com/Yawn-Sean/Daily_CF_Problems / direction

Function direction

SheepCup/Round1/f.cpp:21–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19auto rngl = mt19937_64(random_device()());
20
21array<int, 2> direction(array<int, 2> x1, array<int, 2> x2) {return {x2[0] - x1[0], x2[1] - x1[1]};}
22bool sgn(array<int, 2> x) {return x[0] > 0 || (x[0] == 0 && x[1] > 0);}
23__int128_t cross(array<int, 2> x1, array<int, 2> x2) {return 1ll * x1[0] * x2[1] - 1ll * x1[1] * x2[0];}
24__int128_t dot(array<int, 2> x1, array<int, 2> x2) {return 1ll * x1[0] * x2[0] + 1ll * x1[1] * x2[1];}

Callers 1

fcheckFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected