Submission #741599

# Submission time Handle Problem Language Result Execution time Memory
741599 2023-05-14T12:56:09 Z Joo Best Place (NOI17_bestplace) C++17
100 / 100
37 ms 3144 KB
// Task: https://oj.uz/problem/view/NOI17_bestplace
// Algo: Median
// Date: 14/5/2023

#include <bits/stdc++.h>
using namespace std;

int main()
{
    cin.tie(0)->sync_with_stdio(0);
    int n;
    cin >> n;
    vector<int> xPos(n), yPos(n);
    for (int i = 0; i < n; i++)
        cin >> xPos[i] >> yPos[i];

    sort(xPos.begin(), xPos.end());
    sort(yPos.begin(), yPos.end());

    cout << xPos[n / 2] << " " << yPos[n / 2] << "\n";
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 324 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 324 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 336 KB Output is correct
7 Correct 1 ms 320 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 16 ms 2132 KB Output is correct
2 Correct 23 ms 2236 KB Output is correct
3 Correct 23 ms 2244 KB Output is correct
4 Correct 17 ms 2256 KB Output is correct
5 Correct 20 ms 2256 KB Output is correct
6 Correct 24 ms 2252 KB Output is correct
7 Correct 23 ms 2132 KB Output is correct
8 Correct 22 ms 2292 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 316 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 316 KB Output is correct
5 Correct 1 ms 320 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 216 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 35 ms 3144 KB Output is correct
2 Correct 33 ms 2980 KB Output is correct
3 Correct 23 ms 3028 KB Output is correct
4 Correct 31 ms 2260 KB Output is correct
5 Correct 33 ms 3016 KB Output is correct
6 Correct 32 ms 3020 KB Output is correct
7 Correct 32 ms 3020 KB Output is correct
8 Correct 37 ms 3016 KB Output is correct