Submission #440264

#TimeUsernameProblemLanguageResultExecution timeMemory
440264MrDebooMemory (IOI10_memory)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" #include <bits/stdc++.h> void play(){ map<char,int>pos; for(int i=1;i<=50;i++){ char c=faceup(i); if(pos[c]){ faceup(pos[c]); } else{ c=faceup(i); pos[c]=i; } } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:6:5: error: 'map' was not declared in this scope
    6 |     map<char,int>pos;
      |     ^~~
memory.cpp:6:5: note: suggested alternatives:
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'
  100 |     class map
      |           ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
                 from memory.cpp:3:
/usr/include/c++/10/map:78:13: note:   'std::pmr::map'
   78 |       using map
      |             ^~~
memory.cpp:6:9: error: expected primary-expression before 'char'
    6 |     map<char,int>pos;
      |         ^~~~
memory.cpp:9:12: error: 'pos' was not declared in this scope; did you mean 'pow'?
    9 |         if(pos[c]){
      |            ^~~
      |            pow