제출 #531329

#제출 시각아이디문제언어결과실행 시간메모리
531329andecaandeciBest Place (NOI17_bestplace)C++17
컴파일 에러
0 ms0 KiB
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
    // cin.tie(0) -> ios_base::sync_with_stdio(0);

    int n;
    cin >> n;
    vector<int> x(n), y(n);
    for(int i=0;i<n;i++)
    {
        cin >> x[i] >> y[i];
    }
    sort(x.begin(), x.end());
    sort(y.begin(), y.end());
    cout << x[n/2] << " " << y[n/2] << '
';

}

컴파일 시 표준 에러 (stderr) 메시지

bestplace.cpp:18:40: warning: missing terminating ' character
   18 |     cout << x[n/2] << " " << y[n/2] << '
      |                                        ^
bestplace.cpp:18:40: error: missing terminating ' character
bestplace.cpp:19:1: warning: missing terminating ' character
   19 | ';
      | ^
bestplace.cpp:19:1: error: missing terminating ' character
   19 | ';
      | ^~
bestplace.cpp: In function 'int main()':
bestplace.cpp:21:1: error: expected primary-expression before '}' token
   21 | }
      | ^