Submission #565078

#TimeUsernameProblemLanguageResultExecution timeMemory
565078shahriarkhanBest Place (NOI17_bestplace)C++14
100 / 100
38 ms3248 KiB
#include<bits/stdc++.h>
using namespace std ;

int main()
{
    int n ;
    scanf("%d",&n) ;
    vector<int> x , y ;
    for(int i = 1 ; i <= n ; ++i)
    {
        int a , b ;
        scanf("%d%d",&a,&b) ;
        x.push_back(a) , y.push_back(b) ;
    }
    sort(x.begin(),x.end()) ;
    sort(y.begin(),y.end()) ;
    printf("%d %d\n",x[n/2],y[n/2]) ;
    return 0 ;
}

Compilation message (stderr)

bestplace.cpp: In function 'int main()':
bestplace.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    7 |     scanf("%d",&n) ;
      |     ~~~~~^~~~~~~~~
bestplace.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |         scanf("%d%d",&a,&b) ;
      |         ~~~~~^~~~~~~~~~~~~~
#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...