Borderou de evaluare (job #3210846)
Utilizator | Data | 7 martie 2024 15:29:17 | |
---|---|---|---|
Problema | Aquapark | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:100:81: error: 'i' was not declared in this scope; did you mean 'it'?
100 | std::set<std::pair<int, int>> ::iterator it = S.upper_bound({events[i].x, (1 << 29)});
| ^
| it
main.cpp:100:72: error: no matching function for call to 'std::set<std::pair<int, int> >::upper_bound(<brace-enclosed initializer list>)'
100 | std::set<std::pair<int, int>> ::iterator it = S.upper_bound({events[i].x, (1 << 29)});
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/set:61,
from main.cpp:5:
/usr/include/c++/12.2.1/bits/stl_set.h:869:9: 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_upper_bound_tr(__x))) std::set<_Key, _Compare, _Alloc>::upper_bound(const _Kt&) [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
869 | upper_bound(const _Kt& __x)
| ^~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_set.h:869:9: note: template argument deduction/substitution failed:
main.cpp:100:72: note: couldn't deduce template parameter '_Kt'
100 | std::set<std::pair<int, int>> ::iterator it = S.upper_bound({events[i].x, (1 << 29)});
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_set.h:875:9: note: candidate: 'template<class _Kt> decltype ((std::set<_Key, _Compare, _Alloc>::iterator)(((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_upper_bound_tr(__x))) std::set<_Key, _Compare, _Alloc>::upper_bound(const _Kt&) const [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
875 | upper_bound(const _Kt& __x) const
| ^~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_set.h:875:9: note: template argument deduction/substitution failed:
main.cpp:100:72: note: couldn't deduce template parameter '_Kt'
100 | std::set<std::pair<int, int>> ::iterator it = S.upper_bound({events[i].x, (1 << 29)});
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_set.h:859:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::upper_bound(const key_type&) [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; iterator = std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::const_iterator; key_type = std::pair<int, int>]'
859 | upper_bound(const key_type& __x)
| ^~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_set.h:859:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::set<std::pair<int, int> >::key_type&' {aka 'const std::pair<int, int>&'}
859 | upper_bound(const key_type& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_set.h:863:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::upper_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> >; const_iterator = std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::const_iterator; key_type = std::pair<int, int>]'
863 | upper_bound(const key_type& __x) const
| ^~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_set.h:863:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::set<std::pair<int, int> >::key_type&' {aka 'const std::pair<int, int>&'}
863 | upper_bound(const key_type& __x) const
| ~~~~~~~~~~~~~~~~^~~
main.cpp:132:2: error: expected '}' at end of input
132 | }
| ^
main.cpp:62:11: note: to match this '{'
62 | int main(){
| ^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !