답안 #520516

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
520516 2022-01-30T08:11:16 Z Vimmer Izvanzemaljci (COI21_izvanzemaljci) C++14
5 / 100
26 ms 1876 KB
#include <bits/stdc++.h>
#define in(x) freopen(x, "r", stdin)
#define out(x) freopen(x, "w", stdout)

//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC optimize("-O3")

#define F first
#define S second
#define PB push_back
#define M ll(1e9 + 7)
#define sz(x) (ll)x.size()
#define N 1000500
#define pri(x) cout << x << endl
#define endl '\n'
#define all(x) (x).begin(), (x).end()
#define _ << " " <<

using namespace std;
//typedef tree <ll, null_type, less_equal <ll> , rb_tree_tag, tree_order_statistics_node_update> ordered_set;
//using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef short int si;
typedef unsigned long long ull;

ll f[2][(1 << 12)];

int main()
{
    istream::sync_with_stdio(0); ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    ll n, k;

    cin >> n >> k;

    ll x[n], y[n];

    for (ll i = 0; i < n; i++)
        cin >> x[i] >> y[i];

    if (k == 1)
    {
        ll mxx = -1e18, mnx = 1e18, mxy = -1e18, mny = 1e18;

        for (int i = 0; i < n; i++)
        {
            mxx = max(mxx, x[i]);

            mxy = max(mxy, y[i]);

            mnx = min(mnx, x[i]);

            mny = min(mny, y[i]);
        }

        ll len = max(mxx - mnx, mxy - mny);

        pri(mnx _ mny _ max(1ll, len));

        exit(0);
    }

    assert(0);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 21 ms 1868 KB Output is correct
8 Correct 21 ms 1868 KB Output is correct
9 Correct 20 ms 1868 KB Output is correct
10 Correct 26 ms 1868 KB Output is correct
11 Correct 21 ms 1876 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -