# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1006045 | 2024-06-23T10:40:16 Z | kebine | Best Place (NOI17_bestplace) | C++17 | 84 ms | 2320 KB |
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ int n, ansx, ansy; cin >> n; vector <int> x, y; for(int i = 0; i < n; i++){ int xp, yp; cin >> xp >> yp; x.push_back(xp); y.push_back(yp); } sort(x.begin(), x.end()); sort(y.begin(), y.end()); if(n%2 == 1){ cout << x[(n/2)] << " " << y[(n/2)]; } else{ cout << (x[(n/2) - 1] + x[n/2])/2 << " " << (y[(n/2) - 1] + y[n/2])/2; } }
Compilation message
# | 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 | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 0 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 | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 33 ms | 2252 KB | Output is correct |
2 | Correct | 39 ms | 2008 KB | Output is correct |
3 | Correct | 39 ms | 2136 KB | Output is correct |
4 | Correct | 35 ms | 1992 KB | Output is correct |
5 | Correct | 41 ms | 2320 KB | Output is correct |
6 | Correct | 39 ms | 2116 KB | Output is correct |
7 | Correct | 53 ms | 2188 KB | Output is correct |
8 | Correct | 39 ms | 2000 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 1 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 | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 1 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 67 ms | 2000 KB | Output is correct |
2 | Correct | 59 ms | 1992 KB | Output is correct |
3 | Correct | 52 ms | 1996 KB | Output is correct |
4 | Correct | 46 ms | 1996 KB | Output is correct |
5 | Correct | 60 ms | 1996 KB | Output is correct |
6 | Correct | 84 ms | 1984 KB | Output is correct |
7 | Correct | 59 ms | 2000 KB | Output is correct |
8 | Correct | 59 ms | 2160 KB | Output is correct |