제출 #104689

#제출 시각아이디문제언어결과실행 시간메모리
104689promota전선 연결 (IOI17_wiring)C++14
컴파일 에러
0 ms0 KiB
int min_total_length(vector<int> r,vector<int> b){
    int minLen=0;
    int n=r.size();
    int m=b.size();
    for(int j=0;j<n-1;j++){
        minLen += b[0]-r[j];
    }
    for(int i=1;i<m;i++){
        minLen += b[i]-r[n-1];
    }
    return minLen;
}

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

wiring.cpp:1:22: error: 'vector' was not declared in this scope
 int min_total_length(vector<int> r,vector<int> b){
                      ^~~~~~
wiring.cpp:1:29: error: expected primary-expression before 'int'
 int min_total_length(vector<int> r,vector<int> b){
                             ^~~
wiring.cpp:1:36: error: 'vector' was not declared in this scope
 int min_total_length(vector<int> r,vector<int> b){
                                    ^~~~~~
wiring.cpp:1:43: error: expected primary-expression before 'int'
 int min_total_length(vector<int> r,vector<int> b){
                                           ^~~
wiring.cpp:1:49: error: expression list treated as compound expression in initializer [-fpermissive]
 int min_total_length(vector<int> r,vector<int> b){
                                                 ^