Submission #965107

# Submission time Handle Problem Language Result Execution time Memory
965107 2024-04-18T06:52:48 Z becaido Izvanzemaljci (COI21_izvanzemaljci) C++17
5 / 100
21 ms 3244 KB
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,popcnt,sse4,abm")
#include <bits/stdc++.h>
using namespace std;

#ifdef WAIMAI
#define debug(HEHE...) cout << "[" << #HEHE << "] : ", dout(HEHE)
void dout() {cout << '\n';}
template<typename T, typename...U>
void dout(T t, U...u) {cout << t << (sizeof...(u) ? ", " : ""), dout(u...);}
#else
#define debug(...) 7122
#endif

#define ll long long
#define Waimai ios::sync_with_stdio(false), cin.tie(0)
#define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
#define pb emplace_back
#define F first
#define S second

const int SIZE = 1e5 + 5;

int n, k;
int x[SIZE], y[SIZE];

void solve() {
    cin >> n >> k;
    FOR (i, 1, n) cin >> x[i] >> y[i];
    if (k == 1) {
        int u, d, l, r;
        u = *min_element(x + 1, x + n + 1);
        d = *max_element(x + 1, x + n + 1);
        l = *min_element(y + 1, y + n + 1);
        r = *max_element(y + 1, y + n + 1);
        cout << u << ' ' << l << ' ' << max({1, d - u, r - l}) << '\n';
        return;
    }
}

int main() {
    Waimai;
    solve();
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 21 ms 3216 KB Output is correct
8 Correct 17 ms 3164 KB Output is correct
9 Correct 17 ms 3028 KB Output is correct
10 Correct 18 ms 3244 KB Output is correct
11 Correct 17 ms 3160 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -