Submission #320879

#TimeUsernameProblemLanguageResultExecution timeMemory
320879ishi_10Best Place (NOI17_bestplace)C++14
100 / 100
112 ms3940 KiB
#include<iostream> #include<cmath> #include<bits/stdc++.h> #include<string.h> using namespace std; typedef long long int ll; const ll maxn=1e5+2; int main() { ll n; cin>>n; ll a[n],i; ll b[n]; ll sx=0,sy=0; for(i=0;i<n;i++) { cin>>a[i]>>b[i]; } sort(a,a+n); sort(b,b+n); cout<<a[(((n+1)/ 2) - 1)]<<" "<<b[(((n+1) / 2) - 1)]<<"\n"; cerr<<"\nTime elapsed:"<< 1000 * clock() / CLOCKS_PER_SEC << "ms\n"; return 0; }

Compilation message (stderr)

bestplace.cpp: In function 'int main()':
bestplace.cpp:14:8: warning: unused variable 'sx' [-Wunused-variable]
   14 |     ll sx=0,sy=0;
      |        ^~
bestplace.cpp:14:13: warning: unused variable 'sy' [-Wunused-variable]
   14 |     ll sx=0,sy=0;
      |             ^~
#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...