#include #include #include #include #include #include #include #define INF 99999999999 using namespace std; typedef long long lld; lld eabs(lld num) { if (num < 0) return -num; return num; } struct Point { lld x, y; void SetValues(lld nx, lld ny) { x = nx; y = ny; } bool operator<(const Point& other)const { if (y != other.y) return (y < other.y); return (x < other.x); } lld operator/(const Point& other)const { lld ret = 0; if (eabs(x-other.x) < eabs(y-other.y)) { ret = eabs(x-other.x) + (eabs(y-other.y) - eabs(x - other.x)); } else { ret = eabs(y-other.y) + (eabs(x-other.x) - eabs(y - other.y)); } return ret; } }; lld MN(lld a, lld b) { if (a < b) return a; return b; } lld n, m, k; vector pts; bool SHbyX(Point a, Point b) { if (a.x != b.x) return (a.x < b.x); return (a.y < b.y); } void Sleep() { for (lld i=0;i<500000000;i++) { } } lld Get(lld from, lld to) { //cout<<"Tursim ot "< tmp; Point hpr; ret = MN(Get(from, mid), Get(mid+1, to)); //cout<<"Minimalnoto ot "<= ret) continue; //cout<<"Dobavqme ("<= ret) break; // cout<<"Novo razstoqnie ot ("<