// Source: https://usaco.guide/general/io
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#include <ext/pb_ds/assoc_container.hpp>>
using namespace __gnu_pbds;
#define oset tree<pair<ll,ll>, null_type, less<pair<ll,ll>>, rb_tree_tag, tree_order_statistics_node_update>
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n; cin >> n;
oset xs, ys;
for (ll i{}; i < n; i++){
ll x, y; cin >> x >> y;
xs.insert({x, i});
ys.insert({y, i});
}
cout << xs.find_by_order(n/2)->first << " " << ys.find_by_order(n/2)->first;
}
컴파일 시 표준 에러 (stderr) 메시지
bestplace.cpp:7:41: warning: extra tokens at end of #include directive
7 | #include <ext/pb_ds/assoc_container.hpp>>
| ^| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |