Submission #922524

#TimeUsernameProblemLanguageResultExecution timeMemory
922524salmonPainting Walls (APIO20_paint)C++14
Compilation error
0 ms0 KiB
int it = 0; int it1 = 0; vector<int> temp; if(contract[i].size() != 0 && contract[i][0] == 0) temp.push_back(0); while(it < v.size() && it1 < contract[i].size()){ if(v[it] + 1 == contract[i][it1]){ if(v[it] != M - 1) temp.push_back(v[it] + 1); else{ can[i] = true; } } if(v[it] + 1 <= contract[i][it1]){ it++; } else{ it1++; } }

Compilation message (stderr)

paint.cpp:4:9: error: 'vector' does not name a type
    4 |         vector<int> temp;
      |         ^~~~~~
paint.cpp:5:9: error: expected unqualified-id before 'if'
    5 |         if(contract[i].size() != 0 && contract[i][0] == 0) temp.push_back(0);
      |         ^~
paint.cpp:7:9: error: expected unqualified-id before 'while'
    7 |         while(it < v.size() && it1 < contract[i].size()){
      |         ^~~~~