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_17598484_31060.cpp: In function 'int main()':
0_0_17598484_31060.cpp:23:23: error: no match for 'operator==' (operand types are 'std::map<int, int>::iterator {aka std::_Rb_tree_iterator<std::pair<const int, int> >}' and 'std::map<int, int>::reverse_iterator {aka std::reverse_iterator<std::_Rb_tree_iterator<std::pair<const int, int> > >}')
             else if(it==ma.rbegin())  printf("%d %d\n",id,(--it)->second);
                       ^
0_0_17598484_31060.cpp:23:23: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:60:0,
                 from 0_0_17598484_31060.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_tree.h:231:7: note: bool std::_Rb_tree_iterator<_Tp>::operator==(const _Self&) const [with _Tp = std::pair<const int, int>; std::_Rb_tree_iterator<_Tp>::_Self = std::_Rb_tree_iterator<std::pair<const int, int> >]
       operator==(const _Self& __x) const _GLIBCXX_NOEXCEPT
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_tree.h:231:7: note:   no known conversion for argument 1 from 'std::map<int, int>::reverse_iterator {aka std::reverse_iterator<std::_Rb_tree_iterator<std::pair<const int, int> > >}' to 'const _Self& {aka const std::_Rb_tree_iterator<std::pair<const int, int> >&}'
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:51:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from 0_0_17598484_31060.cpp:6:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/random.tcc:2030:5: note: template<class _RealType1> bool std::operator==(const std::normal_distribution<_RealType>&, const std::normal_distribution<_RealType>&)
     operator==(const std::normal_distribution<_RealType>& __d1,
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/random.tcc:2030:5: note:   template argument deduction/substitution failed:
0_0_17598484_31060.cpp:23:35: note:   'std::map<int, int>::iterator {aka std::_Rb_tree_iterator<std::pair<const int, int> >}' is not derived from 'const std::normal_distribution<_RealType>'
             else if(it==ma.rbegin())  printf("%d %d\n",id,(--it)->second);
                                   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:64:0,
                 from 0_0_17598484_31060.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:271:5: note: template<class _Tp, class _Seq> bool std::operator==(const std::queue<_Tp, _Seq>&, const std::queue<_Tp, _Seq>&)
     operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:271:5: note:   template argument deduction/substitution failed:
0_0_17598484_31060.cpp:23:35: note:   'std::map<int, int>::iterator {aka std::_Rb_tree_iterator<std::pair<const int, int> >}' is not derived from 'const std::queue<_Tp, _Seq>'
             else if(it==ma.rbegin())  printf("%d %d\n",id,(--it)->second);
                                   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:61,
                 from 0_0_17598484_31060.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1511:5: note: template<class _Tp, class _Alloc> bool std::operator==(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)
     operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1511:5: note:   template argument deduction/substitution failed:
0_0_17598484_31060.cpp:23:35: note:   'std::map<int, int>::iterator {aka std::_Rb_tree_iterator<std::pair<const int, int> >}' is not derived from 'const std::vector<_Tp, _Alloc>'
             else if(it==ma.rbegin())  printf("%d %d\n",id,(--it)->second);
                                   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/deque:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:60,
                 from 0_0_17598484_31060.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_deque.h:2029:5: note: template<class _Tp, class _Alloc> bool std::operator==(const std::deque<_Tp, _Alloc>&, const std::deque<_Tp, _Alloc>&)
     operator==(const deque<_Tp, _Alloc>& __x,
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_deque.h:2029:5: note:   template argument deduction/substitution failed:
0_0_17598484_31060.cpp:23:35: note:   'std::map<int, int>::iterator {aka std::_Rb_tree_iterator<std::pair<const int, int> >}' is not derived from 'const std::deque<_Tp, _Alloc>'
             else if(it==ma.rbegin())  printf("%d %d\n",id,(--it)->second);
                                   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/deque:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:60,
                 from 0_0_17598484_31060.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_deque.h:258:5: note: template<class _Tp, class _RefL, class _PtrL, class _RefR, class _PtrR> bool std::operator==(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _RefR, _PtrR>&)
     operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_deque.h:258:5: note:   template argument deduction/substitution failed:
0_0_17598484_31060.cpp:23:35: note:   'std::map<int, int>::iterator {aka std::_Rb_tree_iterator<std::pair<const int, int> >}' is not derived from 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>'
             else if(it==ma.rbegin())  printf("%d %d\n",id,(--it)->second);
                                   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/deque:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:60,
                 from 0_0_17598484_31060.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_deque.h:251:5: note: template<class _Tp, class _Ref, class _Ptr> bool std::operator==(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _Ref, _Ptr>&)
     operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_deque.h:251:5: note:   template argument deduction/substitution failed:
0_0_17598484_31060.cpp:23:35: note:   'std::map<int, int>::iterator {aka std::_Rb_tree_iterator<std::pair<const int, int> >}' is not derived from 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>'
             else if(it==ma.rbegin())  printf("%d %d\n",id,(--it)->second);
                                   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:62:0,
                 from 0_0_17598484_31060.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_multimap.h:903:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator==(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&)
     operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_multimap.h:903:5: note:   template argument deduction/substitution failed:
0_0_17598484_31060.cpp:23:35: note:   'std::map<int, int>::iterator {aka std::_Rb_tree_iterator<std::pair<const int, int> >}' is not derived from 'const std::multimap<_Key, _Tp, _Compare, _Alloc>'
             else if(it==ma.rbegin())  printf("%d %d\n",id,(--it)->second);
                                   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
                 from 0_0_17598484_31060.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:1000:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator==(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&)
     operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x,
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:1000:5: note:   template argument deduction/substitution failed:
0_0_17598484_31060.cpp:23:35: note:   'std::map<int, int>::iterator {aka std::_Rb_tree_iterator<std::pair<const int, int> >}' is not derived from 'const std::map<_Key, _Tp, _Compare, _Alloc>'
             else if(it==ma.rbegin())  printf("%d %d\n",id,(--it)->second);
                                   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:63:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61,
                 from 0_0_17598484_31060.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/tuple:846:5: note: template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const std::tuple<_Args1 ...>&, const std::tuple<_Args2 ...>&)
     operator==(const tuple<_TElements...>& __t,
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/tuple:846:5: note:   template argument deduction/substitution failed:
0_0_17598484_31060.cpp:23:35: note:   'std::map<int, int>::iterator {aka std::_Rb_tree_iterator<std::pair<const int, int> >}' is not derived from 'const std::tuple<_Args1 ...>'
             else if(it==ma.rbegin())  printf("%d %d\n",id,(--it)->second);
                                   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/tuple:39:


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-02 11:39:52, Gzip enabled