F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39574823_16687.cpp: In function 'void Solve()':
0_0_39574823_16687.cpp:13:20: error: no match for 'operator[]' (operand types are 'std::map<long long unsigned int, bool>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   13 |                 qwq[a] = true;
      |                    ^
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/map:63,
                 from .\stdc++.h:152:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:502:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = long long unsigned int; _Tp = bool; _Compare = std::less<long long unsigned int>; _Alloc = std::allocator<std::pair<const long long unsigned int, bool> >; mapped_type = bool; key_type = long long unsigned int]'
  502 |       operator[](const key_type& __k)
      |       ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:502:34: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::map<long long unsigned int, bool>::key_type&' {aka 'const long long unsigned int&'}
  502 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:522:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = long long unsigned int; _Tp = bool; _Compare = std::less<long long unsigned int>; _Alloc = std::allocator<std::pair<const long long unsigned int, bool> >; mapped_type = bool; key_type = long long unsigned int]'
  522 |       operator[](key_type&& __k)
      |       ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:522:29: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::map<long long unsigned int, bool>::key_type&&' {aka 'long long unsigned int&&'}
  522 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
0_0_39574823_16687.cpp:19:16: error: no match for 'operator[]' (operand types are 'std::map<long long unsigned int, bool>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   19 |         if (qwq[tem])
      |                ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:502:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = long long unsigned int; _Tp = bool; _Compare = std::less<long long unsigned int>; _Alloc = std::allocator<std::pair<const long long unsigned int, bool> >; mapped_type = bool; key_type = long long unsigned int]'
  502 |       operator[](const key_type& __k)
      |       ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:502:34: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::map<long long unsigned int, bool>::key_type&' {aka 'const long long unsigned int&'}
  502 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:522:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = long long unsigned int; _Tp = bool; _Compare = std::less<long long unsigned int>; _Alloc = std::allocator<std::pair<const long long unsigned int, bool> >; mapped_type = bool; key_type = long long unsigned int]'
  522 |       operator[](key_type&& __k)
      |       ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:522:29: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::map<long long unsigned int, bool>::key_type&&' {aka 'long long unsigned int&&'}
  522 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
0_0_39574823_16687.cpp:24:24: error: no match for 'operator[]' (operand types are 'std::map<long long unsigned int, bool>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   24 |                 if (qwq[tem])
      |                        ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:502:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = long long unsigned int; _Tp = bool; _Compare = std::less<long long unsigned int>; _Alloc = std::allocator<std::pair<const long long unsigned int, bool> >; mapped_type = bool; key_type = long long unsigned int]'
  502 |       operator[](const key_type& __k)
      |       ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:502:34: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::map<long long unsigned int, bool>::key_type&' {aka 'const long long unsigned int&'}
  502 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:522:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = long long unsigned int; _Tp = bool; _Compare = std::less<long long unsigned int>; _Alloc = std::allocator<std::pair<const long long unsigned int, bool> >; mapped_type = bool; key_type = long long unsigned int]'
  522 |       operator[](key_type&& __k)
      |       ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:522:29: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::map<long long unsigned int, bool>::key_type&&' {aka 'long long unsigned int&&'}
  522 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-12-01 19:51:50, Gzip enabled