Submission #104692

#TimeUsernameProblemLanguageResultExecution timeMemory
104692promotaWiring (IOI17_wiring)C++14
Compilation error
0 ms0 KiB
long long min_total_length(std::vector<int> r,std::vector<int> b){
    long long 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;
}

Compilation message (stderr)

wiring.cpp:1:33: error: 'vector' is not a member of 'std'
 long long min_total_length(std::vector<int> r,std::vector<int> b){
                                 ^~~~~~
wiring.cpp:1:40: error: expected primary-expression before 'int'
 long long min_total_length(std::vector<int> r,std::vector<int> b){
                                        ^~~
wiring.cpp:1:52: error: 'vector' is not a member of 'std'
 long long min_total_length(std::vector<int> r,std::vector<int> b){
                                                    ^~~~~~
wiring.cpp:1:59: error: expected primary-expression before 'int'
 long long min_total_length(std::vector<int> r,std::vector<int> b){
                                                           ^~~
wiring.cpp:1:65: error: expression list treated as compound expression in initializer [-fpermissive]
 long long min_total_length(std::vector<int> r,std::vector<int> b){
                                                                 ^