Submission #940272

#TimeUsernameProblemLanguageResultExecution timeMemory
940272HappyCapybaraMemory (IOI10_memory)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" void play() { vector<vector<int>> p(25); for (int i=1; i<=50; i++) p[faceup(i)-1].push_back(i); for (vector<int> v : p) faceup(p[1]); faceup(p[2]); }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:5:4: error: 'vector' was not declared in this scope
    5 |    vector<vector<int>> p(25);
      |    ^~~~~~
memory.cpp:5:18: error: expected primary-expression before 'int'
    5 |    vector<vector<int>> p(25);
      |                  ^~~
memory.cpp:6:30: error: 'p' was not declared in this scope
    6 |    for (int i=1; i<=50; i++) p[faceup(i)-1].push_back(i);
      |                              ^
memory.cpp:7:16: error: expected primary-expression before 'int'
    7 |    for (vector<int> v : p) faceup(p[1]); faceup(p[2]);
      |                ^~~
memory.cpp:7:49: error: 'p' was not declared in this scope
    7 |    for (vector<int> v : p) faceup(p[1]); faceup(p[2]);
      |                                                 ^
memory.cpp:8:1: error: expected primary-expression before '}' token
    8 | }
      | ^
memory.cpp:7:55: error: expected ')' before '}' token
    7 |    for (vector<int> v : p) faceup(p[1]); faceup(p[2]);
      |        ~                                              ^
      |                                                       )
    8 | }
      | ~                                                      
memory.cpp:8:1: error: expected primary-expression before '}' token
    8 | }
      | ^