Submission #299000

#TimeUsernameProblemLanguageResultExecution timeMemory
299000EJOI2019AndrewMemory (IOI10_memory)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" void play() { map<char,int>pos,vis; for(int i=1; i<=50; ++i) { char a=faceup(i); if(vis[a]==1) faceup(pos[a]); vis[a]=1; pos[a]=i; } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:5:4: error: 'map' was not declared in this scope
    5 |    map<char,int>pos,vis;
      |    ^~~
memory.cpp:5:8: error: expected primary-expression before 'char'
    5 |    map<char,int>pos,vis;
      |        ^~~~
memory.cpp:9:8: error: 'vis' was not declared in this scope
    9 |     if(vis[a]==1)
      |        ^~~
memory.cpp:10:12: error: 'pos' was not declared in this scope
   10 |     faceup(pos[a]);
      |            ^~~
memory.cpp:11:5: error: 'vis' was not declared in this scope
   11 |     vis[a]=1;
      |     ^~~
memory.cpp:12:5: error: 'pos' was not declared in this scope
   12 |     pos[a]=i;
      |     ^~~