Submission #201877

#TimeUsernameProblemLanguageResultExecution timeMemory
201877Leonardo_PaesMemory (IOI10_memory)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" std::vector<int> p[26]; void play() { int i=1, j=50, a; while(i<j){ a = faceup(i); p[a].push_back(i); a = faceup(j); p[a].push_back(j); i++, j--; } for(int i=1; i<=26; i++){ faceup(p[i][0]); faceup(p[i][1]); } }

Compilation message (stderr)

memory.cpp:4:6: error: 'vector' in namespace 'std' does not name a template type
 std::vector<int> p[26];
      ^~~~~~
memory.cpp: In function 'void play()':
memory.cpp:10:9: error: 'p' was not declared in this scope
         p[a].push_back(i);
         ^
memory.cpp:16:16: error: 'p' was not declared in this scope
         faceup(p[i][0]); faceup(p[i][1]);
                ^