Submission #998059

# Submission time Handle Problem Language Result Execution time Memory
998059 2024-06-13T09:03:49 Z piOOE Izvanzemaljci (COI21_izvanzemaljci) C++17
0 / 100
1 ms 604 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 << miny << " " << minx << " " << d << '\n';
        return 0;
    } else {
        assert(false);
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 604 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 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 -