Borderou de evaluare (job #2024223)

Utilizator FlorinHajaFlorin Gabriel Haja FlorinHaja Data 20 septembrie 2017 10:12:00
Problema Drumuri minime Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:45:24: error: no match for ‘operator=’ (operand types are ‘std::set<std::pair<long double, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<long double, int> >}’ and ‘std::set<std::pair<double, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<double, int> >}’) if ((w = q.find(make_pair(d[y],y))) != q.end()) ^ user.cpp:45:24: note: candidates are: In file included from /usr/include/c++/4.8/set:60:0, from user.cpp:6: /usr/include/c++/4.8/bits/stl_tree.h:228:12: note: std::_Rb_tree_const_iterator<std::pair<long double, int> >& std::_Rb_tree_const_iterator<std::pair<long double, int> >::operator=(const std::_Rb_tree_const_iterator<std::pair<long double, int> >&) struct _Rb_tree_const_iterator ^ /usr/include/c++/4.8/bits/stl_tree.h:228:12: note: no known conversion for argument 1 from ‘std::set<std::pair<double, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<double, int> >}’ to ‘const std::_Rb_tree_const_iterator<std::pair<long double, int> >&’ /usr/include/c++/4.8/bits/stl_tree.h:228:12: note: std::_Rb_tree_const_iterator<std::pair<long double, int> >& std::_Rb_tree_const_iterator<std::pair<long double, int> >::operator=(std::_Rb_tree_const_iterator<std::pair<long double, int> >&&) /usr/include/c++/4.8/bits/stl_tree.h:228:12: note: no known conversion for argument 1 from ‘std::set<std::pair<double, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<double, int> >}’ to ‘std::_Rb_tree_const_iterator<std::pair<long double, int> >&&’ user.cpp:46:30: error: no matching function for call to ‘std::set<std::pair<double, int> >::erase(std::set<std::pair<long double, int> >::iterator&)’ q.erase(w); ^ user.cpp:46:30: note: candidates are: In file included from /usr/include/c++/4.8/set:61:0, from user.cpp:6: /usr/include/c++/4.8/bits/stl_set.h:550:7: note: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = std::pair<double, int>; _Compare = std::less<std::pair<double, int> >; _Alloc = std::allocator<std::pair<double, int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::pair<double, int> >; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<double, int> >] erase(const_iterator __position) ^ /usr/include/c++/4.8/bits/stl_set.h:550:7: note: no known conversion for argument 1 from ‘std::set<std::pair<long double, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<long double, int> >}’ to ‘std::set<std::pair<double, int> >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<double, int> >}’ /usr/include/c++/4.8/bits/stl_set.h:580:7: note: std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = std::pair<double, int>; _Compare = std::less<std::pair<double, int> >; _Alloc = std::allocator<std::pair<double, int> >; std::set<_Key, _Compare, _Alloc>::size_type = unsigned int; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<double, int>] erase(const key_type& __x) ^ /usr/include/c++/4.8/bits/stl_set.h:580:7: note: no known conversion for argument 1 from ‘std::set<std::pair<long double, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<long double, int> >}’ to ‘const key_type& {aka const std::pair<double, int>&}’ /usr/include/c++/4.8/bits/stl_set.h:601:7: note: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = std::pair<double, int>; _Compare = std::less<std::pair<double, int> >; _Alloc = std::allocator<std::pair<double, int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::pair<double, int> >; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<double, int> >] erase(const_iterator __first, const_iterator __last) ^ /usr/include/c++/4.8/bits/stl_set.h:601:7: note: candidate expects 2 arguments, 1 provided

Ceva nu functioneaza?