#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned int UInt; #define FOR(i,a,b) for(int i = a; i < (int)(b); ++i) #define FOR_REV(i,a,b) for(int i = b-1; i >= (int)(a); --i) template inline T sqr(T v) { return v * v; } template inline int sign(T v) {return v == 0 ? 0 : (v > 0 ? 1 : -1);} template int get_bit(T v, int bit_index) { return (v >> bit_index) & 1; } //return {0,1} istream& input() { ios_base::sync_with_stdio(false); //#undef INPUT_FROM_FILE #ifdef INPUT_FROM_FILE static ifstream is("HackerRank/input.txt"); #else istream& is = cin; #endif return is; } ostream& output() { cout << setprecision(15); return cout; } ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //Point2 ////////////////////////////////////////////////////////////////////////// template class Point2 { public: Point2(){} Point2(T x_, T y_):x(x_), y(y_) {} bool operator ==(const Point2&) const; bool operator !=(const Point2&) const; Point2& operator +=(const Point2&); Point2& operator -=(const Point2&); Point2& operator /=(T); Point2& operator *=(T); T length() const; T length_square() const; public: T x; T y; }; template inline bool Point2::operator == (const Point2& p) const { return x == p.x && y == p.y; } template inline bool Point2::operator != (const Point2& p) const { return x != p.x || y != p.y; } template inline Point2& Point2::operator +=(const Point2& r) { x += r.x; y += r.y; return *this; } template inline Point2& Point2::operator -=(const Point2& r) { x -= r.x; y -= r.y; return *this; } template inline Point2& Point2::operator *=(T m) { x *= m; y *= m; return *this; } template inline Point2& Point2::operator /=(T val) { x /= val; y /= val; return *this; } template inline T Point2::length() const { return sqrt(length_square()); } template inline T Point2::length_square() const { return (x * x + y * y); } ////////////////////////////////////////////////////////////////////////// typedef Point2 Point2I; //b int main() { istream& is = input(); ostream& os = output(); int t; for (is >> t; t; --t) { int n; is >> n; vector a(n); int x_min=100000,x_max=-100000,y_min=100000,y_max=-100000; FOR (i,0,n) { is >> a[i].x>>a[i].y; x_min=min(x_min,a[i].x); x_max=max(x_max,a[i].x); y_min=min(y_min,a[i].y); y_max=max(y_max,a[i].y); } bool ok =false; //if (x_min>n>>m; // // ll n0=max(n,m); // ll n1=min(n,m); // // ll res= n1-1 + n1*(n0-1); // os<> t; t; --t) // { // int n; // is >> n; // vector a(n); // FOR (i,0,n) // is >> a[i]; // // //int res = 0; // //os << res; // } // return 0; //}