Submission #1176144

#TimeUsernameProblemLanguageResultExecution timeMemory
1176144tt_13Memory (IOI10_memory)C++20
Compilation error
0 ms0 KiB
#include "grader.h"
#include "memory.h"
void play() {
   int i;
   vector<int> v[30];
   char a, b;
   for (i=1;i<=49;i+=2) {
      a=faceup(i);
      b=faceup(i+1);
      v[a-'A'].emplace_back(i);
      v[b-'A'].emplace_back(i+1);
   }
   for(int i=0;i<25;i++)
   {
      for(auto x: v[i]) faceup(x);
   }
}

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:5:4: error: 'vector' was not declared in this scope
    5 |    vector<int> v[30];
      |    ^~~~~~
memory.cpp:5:11: error: expected primary-expression before 'int'
    5 |    vector<int> v[30];
      |           ^~~
memory.cpp:10:7: error: 'v' was not declared in this scope
   10 |       v[a-'A'].emplace_back(i);
      |       ^
memory.cpp:15:19: error: 'v' was not declared in this scope
   15 |       for(auto x: v[i]) faceup(x);
      |                   ^