Borderou de evaluare (job #3291649)
Utilizator | Data | 5 aprilie 2025 11:16:40 | |
---|---|---|---|
Problema | Hashuri | Status | done |
Runda | cex_9 | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:17:45: error: conversion from 'std::unordered_set<int>::iterator' {aka 'std::__detail::_Insert_base<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::iterator'} to non-scalar type 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} requested
17 | set<int>::iterator poz = fr.find(x);
| ~~~~~~~^~~
main.cpp:18:20: error: no match for 'operator!=' (operand types are 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} and 'std::unordered_set<int>::iterator' {aka 'std::__detail::_Insert_base<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::iterator'})
18 | if(poz != fr.end()) fr.erase(poz);
| ~~~ ^~ ~~~~~~~~
| | |
| | std::unordered_set<int>::iterator {aka std::__detail::_Insert_base<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::iterator}
| std::set<int>::iterator {aka std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator}
In file included from /usr/include/c++/12.2.1/regex:66,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:110,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/regex.h:1238:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' (reversed)
1238 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/regex.h:1238:5: note: template argument deduction/substitution failed:
main.cpp:18:30: note: 'std::unordered_set<int>::iterator' {aka 'std::__detail::_Insert_base<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::iterator'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
18 | if(poz != fr.end()) fr.erase(poz);
| ^
/usr/include/c++/12.2.1/bits/regex.h:1405:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' (reversed)
1405 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/regex.h:1405:5: note: template argument deduction/substitution failed:
main.cpp:18:30: note: 'std::unordered_set<int>::iterator' {aka 'std::__detail::_Insert_base<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::iterator'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
18 | if(poz != fr.end()) fr.erase(poz);
| ^
/usr/include/c++/12.2.1/bits/regex.h:1577:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' (reversed)
1577 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/regex.h:1577:5: note: template argument deduction/substitution failed:
main.cpp:18:30: note: 'std::unordered_set<int>::iterator' {aka 'std::__detail::_Insert_base<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::iterator'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
18 | if(poz != fr.end()) fr.erase(poz);
| ^
In file included from /usr/include/c++/12.2.1/bits/stl_algobase.h:67,
from /usr/include/c++/12.2.1/bits/specfun.h:45,
from /usr/include/c++/12.2.1/cmath:1935,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:41:
/usr/include/c++/12.2.1/bits/stl_iterator.h:530:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}' (reversed)
530 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_iterator.h:530:5: note: template argument deduction/substitution failed:
main.cpp:18:30: note: 'std::unordered_set<int>::iterator' {aka 'std::__detail::_Insert_base<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::iterator'} is not derived from 'const std::reverse_iterator<_IteratorL>'
18 | if(poz != fr.end()) fr.erase(poz);
| ^
/usr/include/c++/12.2.1/bits/stl_iterator.h:1656:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}' (reversed)
1656 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_iterator.h:1656:5: note: template argument deduction/substitution failed:
main.cpp:18:30: note: 'std::unordered_set<int>::iterator' {aka 'std::__detail::_Insert_base<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::iterator'} is not derived from 'const std::move_iterator<_IteratorL>'
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !