Submission #1032550

#TimeUsernameProblemLanguageResultExecution timeMemory
1032550ezzzayMemory (IOI10_memory)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" #include<bits/stdc++.h> void play() { map<char,vector<int>>mp; for(int i=1;i<=50;i++){ char a=faceup(i); mp[a].push_back(i); } for(char a='A';a<'Z';a++){ faceup(mp[a][0]); faceup(mp[a][1]); } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:5:4: error: 'map' was not declared in this scope; did you mean 'std::map'?
    5 |    map<char,vector<int>>mp;
      |    ^~~
      |    std::map
In file included from /usr/include/c++/10/map:61,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
                 from memory.cpp:3:
/usr/include/c++/10/bits/stl_map.h:100:11: note: 'std::map' declared here
  100 |     class map
      |           ^~~
memory.cpp:5:8: error: expected primary-expression before 'char'
    5 |    map<char,vector<int>>mp;
      |        ^~~~
memory.cpp:8:7: error: 'mp' was not declared in this scope
    8 |       mp[a].push_back(i);
      |       ^~
memory.cpp:11:14: error: 'mp' was not declared in this scope
   11 |       faceup(mp[a][0]);
      |              ^~