Borderou de evaluare (job #3356923)

Utilizator mateivoican2006@gmail.comVoican Matei [email protected] Data 4 iunie 2026 19:31:11
Problema Sea2 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:21:39: error: 'INT_MAX' was not declared in this scope 21 | auto it = sea.upper_bound({x, INT_MAX}); | ^~~~~~~ main.cpp:3:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'? 2 | #include <set> +++ |+#include <climits> 3 | main.cpp:21:34: error: no matching function for call to 'std::set<std::pair<int, int> >::upper_bound(<brace-enclosed initializer list>)' 21 | auto it = sea.upper_bound({x, INT_MAX}); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/12.2.1/set:61, from main.cpp:2: /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:21:34: note: couldn't deduce template parameter '_Kt' 21 | auto it = sea.upper_bound({x, INT_MAX}); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ /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:21:34: note: couldn't deduce template parameter '_Kt' 21 | auto it = sea.upper_bound({x, INT_MAX}); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ /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:31:44: error: 'INT_MIN' was not declared in this scope 31 | auto it2 = sea.lower_bound({x, INT_MIN}); | ^~~~~~~ main.cpp:31:44: note: 'INT_MIN' is defined in header '<climits>'; did you forget to '#include <climits>'? main.cpp:31:39: error: no matching function for call to 'std::set<std::pair<int, int> >::lower_bound(<brace-enclosed initializer list>)' 31 | auto it2 = sea.lower_bound({x, INT_MIN}); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/12.2.1/bits/stl_set.h:839: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_lower_bound_tr(__x))) std::set<_Key, _Compare, _Alloc>::lower_bound(const _Kt&) [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]' 839 | lower_bound(const _Kt& __x) | ^~~~~~~~~~~ /usr/include/c++/12.2.1/bits/stl_set.h:839:9: note: template argument deduction/substitution failed: Non zero exit status: 1

Ceva nu functioneaza?