#include #include #include #include #include #include #include #include #include using namespace std; #define sqr(x) ((x)*(x)) #define cbr(x) ((x)*(x)*(x)) #define rep(c, i, n) for((i)=(c); (i)<(n); (i)++) struct pt{long long x,y;}; double vecmul(pt a, pt b){ /*Векторное умножение А*В*/ return (a.x*b.y - b.x*a.y); } //скалярное умножение a*b = |a|*|b|*cos(a,b) double dist(double ax, double ay, double bx, double by) { return sqrt(sqr(ax - bx) + sqr(ay - by)); } //DBG templatevoid printarr(T a[], T2 sz, T2 beg = 0) { for (T2 i = beg; i