Borderou de evaluare (job #3249408)

Utilizator RaresStanStan Rares RaresStan Data 16 octombrie 2024 10:39:38
Problema RangeMode 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:58:5: error: 'sort' was not declared in this scope; did you mean 'short'? 58 | sort(a + 1, a + q + 1, crt); | ^~~~ | short In file included from /usr/include/c++/12.2.1/set:60, from main.cpp:3: /usr/include/c++/12.2.1/bits/stl_tree.h: In instantiation of 'static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(_Const_Link_type) [with _Key = std::pair<int, int>; _Val = std::pair<int, int>; _KeyOfValue = std::_Identity<std::pair<int, int> >; _Compare = crt2; _Alloc = std::allocator<std::pair<int, int> >; _Const_Link_type = const std::_Rb_tree_node<std::pair<int, int> >*]': /usr/include/c++/12.2.1/bits/stl_tree.h:2019:37: required from 'std::pair<std::_Rb_tree_iterator<_Val>, std::_Rb_tree_iterator<_Val> > std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::equal_range(const _Key&) [with _Key = std::pair<int, int>; _Val = std::pair<int, int>; _KeyOfValue = std::_Identity<std::pair<int, int> >; _Compare = crt2; _Alloc = std::allocator<std::pair<int, int> >]' /usr/include/c++/12.2.1/bits/stl_tree.h:2518:49: required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::erase(const _Key&) [with _Key = std::pair<int, int>; _Val = std::pair<int, int>; _KeyOfValue = std::_Identity<std::pair<int, int> >; _Compare = crt2; _Alloc = std::allocator<std::pair<int, int> >; size_type = long unsigned int]' /usr/include/c++/12.2.1/bits/stl_set.h:685:26: required from 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = std::pair<int, int>; _Compare = crt2; _Alloc = std::allocator<std::pair<int, int> >; size_type = long unsigned int; key_type = std::pair<int, int>]' main.cpp:35:16: required from here /usr/include/c++/12.2.1/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const 770 | is_invocable_v<const _Compare&, const _Key&, const _Key&>, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/12.2.1/bits/stl_tree.h:770:15: note: 'std::is_invocable_v<const crt2&, const std::pair<int, int>&, const std::pair<int, int>&>' evaluates to false Non zero exit status: 1

Ceva nu functioneaza?