QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#558909#3449. Pizza Problems5un_xiaomivita_mboxCompile Error//C++171.9kb2024-09-11 19:16:212024-09-11 19:16:27

详细

answer.code: In function ‘int get(std::string)’:
answer.code:12:12: error: reference to ‘map’ is ambiguous
   12 |         if(map.count(s)) return map[s];
      |            ^~~
In file included from /usr/include/c++/13/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:152,
                 from answer.code:1:
/usr/include/c++/13/bits/stl_map.h:102:11: note: candidates are: ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
  102 |     class map
      |           ^~~
answer.code:6:28: note:                 ‘std::map<std::__cxx11::basic_string<char>, int> map’
    6 | std::map<std::string, int> map;
      |                            ^~~
answer.code:12:33: error: reference to ‘map’ is ambiguous
   12 |         if(map.count(s)) return map[s];
      |                                 ^~~
/usr/include/c++/13/bits/stl_map.h:102:11: note: candidates are: ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
  102 |     class map
      |           ^~~
answer.code:6:28: note:                 ‘std::map<std::__cxx11::basic_string<char>, int> map’
    6 | std::map<std::string, int> map;
      |                            ^~~
answer.code:14:16: error: reference to ‘map’ is ambiguous
   14 |         return map[s] = cc;
      |                ^~~
/usr/include/c++/13/bits/stl_map.h:102:11: note: candidates are: ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
  102 |     class map
      |           ^~~
answer.code:6:28: note:                 ‘std::map<std::__cxx11::basic_string<char>, int> map’
    6 | std::map<std::string, int> map;
      |                            ^~~