Submission #998062

# Submission time Handle Problem Language Result Execution time Memory
998062 2024-06-13T09:06:13 Z piOOE Izvanzemaljci (COI21_izvanzemaljci) C++17
5 / 100
17 ms 1884 KB
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n, k;
    cin >> n >> k;

    vector<pair<ll, ll>> a(n);
    for (auto &[x, y] : a) {
        cin >> x >> y;
    }

    if (k == 1) {
        ll minx = 2e9, maxx = -2e9, miny = 2e9, maxy = -2e9;
        for (auto &[x, y] : a) {
            minx = min(minx, x);
            maxx = max(maxx, x);
            miny = min(miny, y);
            maxy = max(maxy, y);
        }
        ll d = max({1LL, maxy - miny, maxx - minx});
        cout << minx << " " << miny << " " << d << '\n';
        return 0;
    } else {
        assert(false);
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 16 ms 1884 KB Output is correct
8 Correct 14 ms 1884 KB Output is correct
9 Correct 15 ms 1884 KB Output is correct
10 Correct 15 ms 1884 KB Output is correct
11 Correct 17 ms 1884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 604 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 604 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 600 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 604 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -