Submission #730045

# Submission time Handle Problem Language Result Execution time Memory
730045 2023-04-25T07:24:06 Z Akshat369 Best Place (NOI17_bestplace) C++17
51 / 100
29 ms 4056 KB
#include <bits/stdc++.h>

using namespace std;
#define int long long
#define endl '\n'
//#define size size()
const int mod = 1000 * 1000 * 1000 + 7;
const int N = 100005;

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);



        int n;
        cin>>n;
        int a[n] , b[n];
    for (int i = 0; i < n; ++i) {
        cin>>a[i]>>b[i];
    }
        vector<pair<int, int > > v;
        for (int i = 0; i < n; ++i) {
            v.push_back({a[i],b[i]});
        }
        sort(v.begin(), v.end());
        cout<<v[n/2].first<<" "<<v[n/2-1].second<<endl;
        //cout<<v[n/2].second;
    }

# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 284 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 0 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 4016 KB Output is correct
2 Correct 23 ms 4052 KB Output is correct
3 Correct 24 ms 4052 KB Output is correct
4 Correct 18 ms 4052 KB Output is correct
5 Correct 26 ms 4056 KB Output is correct
6 Correct 25 ms 4048 KB Output is correct
7 Correct 26 ms 4056 KB Output is correct
8 Correct 23 ms 4052 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 29 ms 4052 KB Output isn't correct
2 Halted 0 ms 0 KB -