Submission #782891

#TimeUsernameProblemLanguageResultExecution timeMemory
782891PetrixBest Place (NOI17_bestplace)C++17
0 / 100
67 ms2960 KiB
#include <iostream> #include <algorithm> using namespace std; #define INF 1000000001 int a[100001],b[100001]; int main() { int n,i,max1=0,max2=0,min1=INF,min2=INF; cin>>n; for(i=0;i<n;i++){ cin>>a[i]>>b[i]; } sort(a,a+n);sort(b,b+n); cout<<a[n/2]<<b[n/2]; return 0; }

Compilation message (stderr)

bestplace.cpp: In function 'int main()':
bestplace.cpp:11:13: warning: unused variable 'max1' [-Wunused-variable]
   11 |     int n,i,max1=0,max2=0,min1=INF,min2=INF;
      |             ^~~~
bestplace.cpp:11:20: warning: unused variable 'max2' [-Wunused-variable]
   11 |     int n,i,max1=0,max2=0,min1=INF,min2=INF;
      |                    ^~~~
bestplace.cpp:11:27: warning: unused variable 'min1' [-Wunused-variable]
   11 |     int n,i,max1=0,max2=0,min1=INF,min2=INF;
      |                           ^~~~
bestplace.cpp:11:36: warning: unused variable 'min2' [-Wunused-variable]
   11 |     int n,i,max1=0,max2=0,min1=INF,min2=INF;
      |                                    ^~~~
#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...