Borderou de evaluare (job #2416954)
Utilizator | Data | 28 aprilie 2019 17:28:19 | |
---|---|---|---|
Problema | Lowest Common Ancestor | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:65:35: error: no matching function for call to 'std::set<std::pair<int, int> >::lower_bound(<brace-enclosed initializer list>)'
it=S.lower_bound({MAX[b],});
^
In file included from /usr/include/c++/6/set:61:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:87,
from main.cpp:1:
/usr/include/c++/6/bits/stl_set.h:727:7: note: candidate: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::lower_bound(const key_type&) [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::pair<int, int> >; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<int, int>]
lower_bound(const key_type& __x)
^~~~~~~~~~~
/usr/include/c++/6/bits/stl_set.h:727:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type& {aka const std::pair<int, int>&}'
/usr/include/c++/6/bits/stl_set.h:731:7: note: candidate: std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::lower_bound(const key_type&) const [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<int, int> >; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<int, int>]
lower_bound(const key_type& __x) const
^~~~~~~~~~~
/usr/include/c++/6/bits/stl_set.h:731:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type& {aka const std::pair<int, int>&}'
/usr/include/c++/6/bits/stl_set.h:737:2: note: candidate: template<class _Kt> decltype ((std::set<_Key, _Compare, _Alloc>::iterator)(((std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_lower_bound_tr(__x))) std::set<_Key, _Compare, _Alloc>::lower_bound(const _Kt&) [with _Kt = _Kt; _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]
lower_bound(const _Kt& __x)
^~~~~~~~~~~
/usr/include/c++/6/bits/stl_set.h:737:2: note: template argument deduction/substitution failed:
main.cpp:65:35: note: couldn't deduce template parameter '_Kt'
it=S.lower_bound({MAX[b],});
^
In file included from /usr/include/c++/6/set:61:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:87,
from main.cpp:1:
/usr/include/c++/6/bits/stl_set.h:743:2: note: candidate: template<class _Kt> decltype ((std::set<_Key, _Compare, _Alloc>::const_iterator)(((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_lower_bound_tr(__x))) std::set<_Key, _Compare, _Alloc>::lower_bound(const _Kt&) const [with _Kt = _Kt; _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]
lower_bound(const _Kt& __x) const
^~~~~~~~~~~
/usr/include/c++/6/bits/stl_set.h:743:2: note: template argument deduction/substitution failed:
main.cpp:65:35: note: couldn't deduce template parameter '_Kt'
it=S.lower_bound({MAX[b],});
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !