Submission #924960

#TimeUsernameProblemLanguageResultExecution timeMemory
924960sleepntsheepBest Place (NOI17_bestplace)C++17
100 / 100
36 ms2904 KiB
#include <iostream> #include <fstream> #include <iomanip> #include <cmath> #include <cassert> #include <cstring> #include <vector> #include <algorithm> #include <deque> #include <set> #include <utility> #include <array> #include <complex> using u32 = unsigned; using i32 = int; using i64 = long long; using u64 = unsigned long long; using f64 = double; using f80 = long double; using namespace std; using pt = complex<f80>; #define ALL(x) begin(x), end(x) #define ShinLena cin.tie(nullptr)->sync_with_stdio(false); #define N 200005 int n, x[N], y[N], b[N], zx, zy;; int main() { ShinLena; cin >> n; for (int i = 1; i <= n; ++i) cin >> x[i] >> y[i], b[i] = i; sort(b+1, b+1+n, [](int i, int j){ return x[i] < x[j]; }); zx = x[b[n/2+1]]; sort(b+1, b+1+n, [](int i, int j){ return y[i] < y[j]; }); zy = y[b[n/2+1]]; cout << zx << ' ' << zy; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...