Submission #1011781

# Submission time Handle Problem Language Result Execution time Memory
1011781 2024-07-01T08:20:33 Z devariaota Best Place (NOI17_bestplace) C++17
100 / 100
30 ms 4300 KB
//made by djsksbrbf
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;

int main(){
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  
  ll n; cin >> n;
  vector <ll> xs, ys;
  for(ll i = 0 ; i < n ; i++){
    ll x, y; cin >> x >> y;
    xs.push_back(x);
    ys.push_back(y);
  }
  sort(xs.begin(), xs.end());
  sort(ys.begin(), ys.end());
  
  if(!(n % 2))cout << (xs[n / 2] + xs[n / 2 - 1]) / 2 << ' ' << (ys[n / 2] + ys[n / 2 - 1]) / 2 << endl;
  else cout << xs[n / 2] << ' ' << ys[n / 2] << endl;
  
  return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 392 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 360 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 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 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 15 ms 3272 KB Output is correct
2 Correct 18 ms 3184 KB Output is correct
3 Correct 19 ms 3268 KB Output is correct
4 Correct 13 ms 3272 KB Output is correct
5 Correct 19 ms 3388 KB Output is correct
6 Correct 18 ms 3268 KB Output is correct
7 Correct 18 ms 3268 KB Output is correct
8 Correct 23 ms 3272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 452 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 408 KB Output is correct
8 Correct 0 ms 344 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 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 4040 KB Output is correct
2 Correct 27 ms 4300 KB Output is correct
3 Correct 18 ms 4040 KB Output is correct
4 Correct 22 ms 3272 KB Output is correct
5 Correct 26 ms 4040 KB Output is correct
6 Correct 26 ms 4036 KB Output is correct
7 Correct 25 ms 4036 KB Output is correct
8 Correct 30 ms 4040 KB Output is correct