Submission #1005986

#TimeUsernameProblemLanguageResultExecution timeMemory
1005986christinelynnBest Place (NOI17_bestplace)C++17
100 / 100
27 ms2040 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define int long long #define inf LLONG_MAX #define pb push_back #define lc 2*pos+1 #define rc 2*pos+2 #define halleluya ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); signed main(){ halleluya int n;cin>>n; vector<int>x(n);vector<int>y(n); for (int i=0;i<n;i++)cin>>x[i]>>y[i]; sort(x.begin(),x.end()); sort(y.begin(),y.end()); int midx=x.size()/2,midy=y.size()/2; cout<<x[midx]<<" "<<y[midy]; } //terpisah value x dan ynya //median doang kah?
#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...