Submission #477051

#TimeUsernameProblemLanguageResultExecution timeMemory
477051glomeMemory (IOI10_memory)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" void play() { map<char, vector<int>> m; for (int i = 2; i<=50; i++) { char f = faceup(1), s = faceup(i); m[s].push_back(i); } for (char i = 'A'; i<='Y'; i++) { char a = faceup(m[i][0]); char b = faceup(m[i][1]); } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:5:3: error: 'map' was not declared in this scope
    5 |   map<char, vector<int>> m;
      |   ^~~
memory.cpp:5:7: error: expected primary-expression before 'char'
    5 |   map<char, vector<int>> m;
      |       ^~~~
memory.cpp:8:5: error: 'm' was not declared in this scope
    8 |     m[s].push_back(i);
      |     ^
memory.cpp:7:10: warning: unused variable 'f' [-Wunused-variable]
    7 |     char f = faceup(1), s = faceup(i);
      |          ^
memory.cpp:11:21: error: 'm' was not declared in this scope
   11 |     char a = faceup(m[i][0]);
      |                     ^
memory.cpp:11:10: warning: unused variable 'a' [-Wunused-variable]
   11 |     char a = faceup(m[i][0]);
      |          ^
memory.cpp:12:10: warning: unused variable 'b' [-Wunused-variable]
   12 |     char b = faceup(m[i][1]);
      |          ^