Submission #520519

# Submission time Handle Problem Language Result Execution time Memory
520519 2022-01-30T08:15:04 Z N1NT3NDO Izvanzemaljci (COI21_izvanzemaljci) C++14
5 / 100
23 ms 1880 KB
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#define sz(x) (int)x.size()
#define fi first
#define sd second
#define all(x) x.begin(), x.end()

using namespace std;
//using namespace __gnu_pbds;

//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
//#pragma GCC optimize("unroll-loops")
//#pragma GCC optimize("-O3")
//#pragma GCC optimize("avx2")

const int N = (int)1e5 + 500;
int n, k;

pair<pair<int, int>, int> get(vector<int> x, vector<int> y)
{
    int x0 = *min_element(all(x)), y0 = *min_element(all(y));
    int l = max(*max_element(all(x)) - x0, *max_element(all(y)) - y0);
    return {{x0, y0}, max(l, 1)};
}

int main()
{
    ios::sync_with_stdio(0); cin.tie(NULL);
    cin >> n >> k;
    vector<int> x(n), y(n);
    for(int i = 0; i < n; i++) cin >> x[i] >> y[i];
    if (k == 1)
    {

        auto ans = get(x, y);
        cout << ans.fi.fi << ' ' << ans.fi.sd << ' ' << ans.sd;
        return 0;
    }


}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 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 1876 KB Output is correct
8 Correct 21 ms 1880 KB Output is correct
9 Correct 20 ms 1868 KB Output is correct
10 Correct 23 ms 1880 KB Output is correct
11 Correct 23 ms 1868 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -