Submission #956432

#TimeUsernameProblemLanguageResultExecution timeMemory
956432nigusMinerals (JOI19_minerals)C++14
Compilation error
0 ms0 KiB
#include "minerals.h" void Solve(int N) { int n = N; vector<int> done(2*n, 0); for(int c1 = 0; c1 < 2*n; c1++){ if(done[c1] == 0){ Query(c1+1); for(int c2 = c1+1; c2 < 2*n; c2++){ if(done[c2] == 0){ int temp = Query(c2+1); if(temp == 1){ Answer(c1+1,c2+1); done[c1] = 1; done[c2] = 1; } Query(c2+1); if(done[c1] == 1)break; } } Query(c1+1); } } }

Compilation message (stderr)

minerals.cpp: In function 'void Solve(int)':
minerals.cpp:6:5: error: 'vector' was not declared in this scope
    6 |     vector<int> done(2*n, 0);
      |     ^~~~~~
minerals.cpp:6:12: error: expected primary-expression before 'int'
    6 |     vector<int> done(2*n, 0);
      |            ^~~
minerals.cpp:8:12: error: 'done' was not declared in this scope
    8 |         if(done[c1] == 0){
      |            ^~~~