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_26028875_20157.cpp: In function 'void dfs(int, int)':
0_0_26028875_20157.cpp:58:9: error: no match for 'operator=' (operand types are 'std::set<int>::reverse_iterator {aka std::reverse_iterator<std::_Rb_tree_const_iterator<int> >}' and 'std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}')
  for(it = s[fa].begin(); it1 != s[fa].end(); it1++)
         ^
0_0_26028875_20157.cpp:58:9: note: candidate is:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:67:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_26028875_20157.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:97:11: note: std::reverse_iterator<std::_Rb_tree_const_iterator<int> >& std::reverse_iterator<std::_Rb_tree_const_iterator<int> >::operator=(const std::reverse_iterator<std::_Rb_tree_const_iterator<int> >&)
     class reverse_iterator
           ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:97:11: note:   no known conversion for argument 1 from 'std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}' to 'const std::reverse_iterator<std::_Rb_tree_const_iterator<int> >&'
0_0_26028875_20157.cpp:58:26: error: 'it1' was not declared in this scope
  for(it = s[fa].begin(); it1 != s[fa].end(); it1++)
                          ^
0_0_26028875_20157.cpp:60:21: error: could not convert 's[id].std::set<_Key, _Compare, _Alloc>::find<int, std::less<int>, std::allocator<int> >((* & it.std::reverse_iterator<_Iterator>::operator*<std::_Rb_tree_const_iterator<int> >()))' from 'std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}' to 'bool'
   if(s[id].find(*it))
                     ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-02-17 09:24:49, Gzip enabled