# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
320838 | nishuz | Best Place (NOI17_bestplace) | C++14 | 34 ms | 3044 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define ull unsigned long long
#define ld long double
#define F first
#define S second
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
using namespace __gnu_pbds;
using namespace std;
template <typename T> using oset = tree <pair <T, T>, null_type, less <pair <T, T>>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T>
void ckmin(T& a, const T b) {a = min(a, b);}
template <typename T>
void ckmax(T& a, const T b) {a = max(a, b);}
template <typename T>
void print(vector <T> v) {
for (T i : v) cout << i << " ";
cout << '\n';
}
template <typename T>
void print(vector <vector <T>>& v) {
for (vector <T>& vv : v) {
for (T& i : vv)
cout << i << " ";
cout << '\n';
}
}
template <typename T>
void read(vector <T>& v) {for (T& i : v) cin >> i;}
template <typename T>
void read(T&& t) {cin >> t;}
template <typename T, typename... Args>
void read(T&& t, Args&&... args)
{
cin >> t;
read(forward<Args>(args)...);
}
template <typename T>
void print(T&& t) {cout << t << '\n';}
template <typename T, typename... Args>
void print(T&& t, Args&&... args)
{
cout << t << " ";
print(forward<Args>(args)...);
}
void usaco(string name = "")
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
if(name.size())
{
freopen((name+".in").c_str(), "r", stdin);
freopen((name+".txt").c_str(), "w", stdout);
}
}
void solve()
{
int n;
cin >> n;
vector <pair <int, int>> v(n);
for (int i = 0; i < n; ++i) cin >> v[i].F >> v[i].S;
sort(all(v));
cout << v[n/2].F << " 0\n";
}
int32_t main()
{
usaco();
int t = 1;
while (t--) solve();
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |