Submission #1070032

#TimeUsernameProblemLanguageResultExecution timeMemory
1070032vjudge1Memory (IOI10_memory)C++17
Compilation error
0 ms0 KiB
#include "grader.h"
#include "memory.h"
void play() {
   vector<int> v(30, 0);
   for (int i = 0; i <= 50; i++) {
      int k = faceup(i);
      if (v[k - 'a'] != 0) faceup(v[k - 'a']);
      else
         if (i < 50) faceup(i + 1);
      v[k - 'a'] = i; 
   }
}

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:4:4: error: 'vector' was not declared in this scope
    4 |    vector<int> v(30, 0);
      |    ^~~~~~
memory.cpp:4:11: error: expected primary-expression before 'int'
    4 |    vector<int> v(30, 0);
      |           ^~~
memory.cpp:7:11: error: 'v' was not declared in this scope
    7 |       if (v[k - 'a'] != 0) faceup(v[k - 'a']);
      |           ^
memory.cpp:10:7: error: 'v' was not declared in this scope
   10 |       v[k - 'a'] = i;
      |       ^