답안 #565078

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
565078 2022-05-20T08:48:34 Z shahriarkhan Best Place (NOI17_bestplace) C++14
100 / 100
38 ms 3248 KB
#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

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) ;
      |         ~~~~~^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 300 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 324 KB Output is correct
3 Correct 1 ms 300 KB Output is correct
4 Correct 1 ms 300 KB Output is correct
5 Correct 1 ms 300 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 21 ms 2240 KB Output is correct
2 Correct 28 ms 2452 KB Output is correct
3 Correct 30 ms 2496 KB Output is correct
4 Correct 23 ms 2464 KB Output is correct
5 Correct 25 ms 2396 KB Output is correct
6 Correct 27 ms 2488 KB Output is correct
7 Correct 26 ms 2300 KB Output is correct
8 Correct 24 ms 2404 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 2 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 300 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 312 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 38 ms 3240 KB Output is correct
2 Correct 36 ms 3216 KB Output is correct
3 Correct 25 ms 3152 KB Output is correct
4 Correct 34 ms 2496 KB Output is correct
5 Correct 35 ms 3136 KB Output is correct
6 Correct 35 ms 3248 KB Output is correct
7 Correct 35 ms 3108 KB Output is correct
8 Correct 34 ms 3128 KB Output is correct