In file included from /usr/include/c++/13/map:62,
from tram.cpp:5:
/usr/include/c++/13/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 = Segment*; _Val = Segment*; _KeyOfValue = std::_Identity<Segment*>; _Compare = BestSeatCmp; _Alloc = std::allocator<Segment*>; _Const_Link_type = const std::_Rb_tree_node<Segment*>*]':
/usr/include/c++/13/bits/stl_tree.h:2020: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 = Segment*; _Val = Segment*; _KeyOfValue = std::_Identity<Segment*>; _Compare = BestSeatCmp; _Alloc = std::allocator<Segment*>]'
/usr/include/c++/13/bits/stl_tree.h:2519: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 = Segment*; _Val = Segment*; _KeyOfValue = std::_Identity<Segment*>; _Compare = BestSeatCmp; _Alloc = std::allocator<Segment*>; size_type = long unsigned int]'
/usr/include/c++/13/bits/stl_set.h:687:26: required from 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = Segment*; _Compare = BestSeatCmp; _Alloc = std::allocator<Segment*>; size_type = long unsigned int; key_type = Segment*]'
tram.cpp:113:17: required from here
/usr/include/c++/13/bits/stl_tree.h:772:15: error: static assertion failed: comparison object must be invocable as const
772 | is_invocable_v<const _Compare&, const _Key&, const _Key&>,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_tree.h:772:15: note: 'std::is_invocable_v<const BestSeatCmp&, Segment* const&, Segment* const&>' evaluates to false
tram.cpp: In function 'int main()':
tram.cpp:126:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
126 | scanf("%d%d", &N, &M);
| ~~~~~^~~~~~~~~~~~~~~~
tram.cpp:135:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
135 | scanf(" %c", &op);
| ~~~~~^~~~~~~~~~~~
tram.cpp:163:12: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
163 | scanf("%d", &x); --x;
| ~~~~~^~~~~~~~~~