Submission #494776

# Submission time Handle Problem Language Result Execution time Memory
494776 2021-12-16T08:41:52 Z Kushagra_J Best Place (NOI17_bestplace) C++17
100 / 100
36 ms 1220 KB
//#pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("avx,avx2,sse,sse2")
#include <bits/stdc++.h>

using namespace std;
//#define int long long
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef set<int> si;
typedef map<int, int> mi;
#define fst first;
#define scnd second;
#define pb push_back
#define ins insert
#define nl '\n'
#define all(v) (v).begin(), (v).end();
#define allR(v) (v).rbegin(), (v).rend();
#define sorta(v) sort((v).begin(),(v).end());
#define sortd(x) sort((x).rbegin(), (x).rend());
#define loop(i, a, t) for (int (i)=a; (i)<=(t); (i)++)
#define loopr(i, a, b) for (int (i)=a; (i)>=(b); (i)--)
#define FILE  freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int inf = 1e9 + 10;

void solve() {
int n;
cin>>n;
vector<int> a(n);
vector<int> b(n);
for(int i=0; i<n ; i++ )
{
    cin>>a[i] >> b[i];
}

    sorta(a);
    sorta(b);
    cout<<a[a.size()/2]<<" "<<b[b.size()/2];
}

signed main() {
    faster
    int t = 1;
//cin>>t;
    while (t--) {
        solve();
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 1100 KB Output is correct
2 Correct 21 ms 1100 KB Output is correct
3 Correct 23 ms 1108 KB Output is correct
4 Correct 18 ms 1100 KB Output is correct
5 Correct 21 ms 1100 KB Output is correct
6 Correct 25 ms 1220 KB Output is correct
7 Correct 22 ms 1100 KB Output is correct
8 Correct 25 ms 1112 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 34 ms 1100 KB Output is correct
2 Correct 30 ms 1108 KB Output is correct
3 Correct 22 ms 1100 KB Output is correct
4 Correct 30 ms 1100 KB Output is correct
5 Correct 34 ms 1100 KB Output is correct
6 Correct 36 ms 1100 KB Output is correct
7 Correct 32 ms 1100 KB Output is correct
8 Correct 31 ms 1100 KB Output is correct