This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast,inline") // Ofast = O3,fast-math,allow-store-data-races,no-protect-parens
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("bmi,bmi2,lzcnt,popcnt")                      // bit manipulation
#pragma GCC target("movbe")                                      // byte swap
#pragma GCC target("aes,pclmul,rdrnd")                           // encryption
#pragma GCC target("avx,avx2,f16c,fma,sse3,ssse3,sse4.1,sse4.2")
typedef long long ll;
#define rep(i, a, b) for (int i = (a); i < int(b); i++)
#define rrep(i, a, b) for (int i = (a) - 1; i >= int(b); i--)
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define pb push_back
inline void fast() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); }
ll INF = 1000000000;
ll mod = 1e9 + 7;
#define int ll
#define float double
//
int N;
int32_t main()
{
    fast();
    cin >> N;
    ll x, y;
    ll x1 = -1, x2 = -1, y1 = -1, y2 = -1;
    rep(i,0,N) {
        cin >> x >> y;
        if (x1 == -1 || x1 == x) x1 = x;
        else x2 = x;
        if (y1 == -1 || y1 == y) y1 = y;
        else y2 = y;
        assert(x >= 0); //
        assert(y >= 0); //
    }
    // cerr << x1 << " " << x2 << " " << y1 << " " << y2 << "\n";
    if (x2 < x1) swap(x2, x1);
    if (y2 < y1) swap(y2, y1);
    if (x2 - x1 > 1) {
        ll ans = x2 - x1;
        ans /= 2;
        ans += x1;
        cout << ans << " " << y1 << " " << ans << " " << y2 << "\n";
    }
    else {
        ll ans = y2 - y1;
        ans /= 2;
        ans += y1;
        cout << x1 << " " << ans << " " << x2 << " " << ans << "\n";
    }
}
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |