F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38045332_32371.cpp:1:1876: fatal error: GCC4.9.2/lib/gcc/x86_64-w64-mingw32/4.9.2/include/iostream>usin: Invalid argument
 #include <iostream>using namespace std;typedef long long Lint;const int maxn = 5e5 + 10;Lint x[maxn], y[maxn];int n;bool check(Lint x1, Lint y1, Lint x2, Lint y2) {    if (x1 == x2)        return true;    if (y1 == y2)        return true;    if (abs(x1 - x2) == abs(y1 - y2))        return true;    return false;}bool is_ok(Lint xx, Lint yy) {    for (int i = 1; i <= n; i++) {        if (!check(xx, yy, x[i], y[i])) {            return false;        }    }    return true;}void solve() {    cin >> n;    for (int i = 1; i <= n; i++) {        cin >> x[i] >> y[i];        x[i] <<= 1;        y[i] <<= 1;    }    int pos = 0;    for (int i = 2; i <= n; i++) {        if (!check(x[1], y[1], x[i], y[i])) {            pos = i;            break;        }    }    if (pos == 0) {        cout << "YES\n";        return;    }    pair<Lint, Lint> V[] = {{x[pos], y[1]},                            {x[1], y[pos]},                            {(y[pos] - y[1] + x[1] + x[pos]) / 2, (x[pos] - x[1] + y[1] + y[pos]) / 2},                            {(y[1] - y[pos] + x[1] + x[pos]) / 2, (x[1] - x[pos] + y[1] + y[pos]) / 2},                            {x[1] - y[1] + y[pos], y[pos]},                            {x[pos] - y[pos] + y[1], y[1]},                            {x[pos] - y[1] + y[pos], y[1]},                            {x[1] - y[pos] + y[1], y[pos]},                            {x[pos], x[1] - x[pos] + y[1]},                            {x[1], x[pos] - x[1] + y[pos]},                            {x[1], x[1] - x[pos] + y[pos]},                            {x[pos], x[pos] - x[1] + y[1]}};    for (auto it : V) {        Lint x = it.first, y = it.second;        if (is_ok(x, y)) {            cout << "YES\n";            return;        }    }    cout << "NO\n";}int main() {    ios::sync_with_stdio(0);    cin.tie(0);    int T;    cin >> T;    while (T--)        solve();    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^
compilation terminated.


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-16 15:23:18, Gzip enabled