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_35388418_2046.cpp: In function 'int main()':
0_0_35388418_2046.cpp:43:15: error: no match for 'operator[]' (operand types are 'std::map<long long int, long long int>' and 'Robot')
      if(repeat[ro[i]]){
               ^
0_0_35388418_2046.cpp:43:15: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
                 from 0_0_35388418_2046.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:491:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = long long int; _Tp = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, long long int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = long long int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = long long int]
       operator[](const key_type& __k)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:491:7: note:   no known conversion for argument 1 from 'Robot' to 'const key_type& {aka const long long int&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:511:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = long long int; _Tp = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, long long int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = long long int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = long long int]
       operator[](key_type&& __k)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:511:7: note:   no known conversion for argument 1 from 'Robot' to 'std::map<long long int, long long int>::key_type&& {aka long long int&&}'
0_0_35388418_2046.cpp:44:13: error: no match for 'operator[]' (operand types are 'std::map<long long int, long long int>' and 'Robot')
       repeat[ro[i]] == 0; re--;
             ^
0_0_35388418_2046.cpp:44:13: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
                 from 0_0_35388418_2046.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:491:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = long long int; _Tp = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, long long int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = long long int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = long long int]
       operator[](const key_type& __k)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:491:7: note:   no known conversion for argument 1 from 'Robot' to 'const key_type& {aka const long long int&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:511:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = long long int; _Tp = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, long long int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = long long int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = long long int]
       operator[](key_type&& __k)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:511:7: note:   no known conversion for argument 1 from 'Robot' to 'std::map<long long int, long long int>::key_type&& {aka long long int&&}'


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-06-26 16:39:20, Gzip enabled