events.cpp: In function 'int main()':
events.cpp:18:5: error: 'sort' was not declared in this scope; did you mean 'qsort'?
18 | sort(u.begin(),u.end());
| ^~~~
| qsort
events.cpp:22:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
22 | auto [a,j] = u[i];
| ^
events.cpp:27:38: error: 'INT_MAX' was not declared in this scope
27 | auto t = s.lower_bound({-INT_MAX,0});
| ^~~~~~~
events.cpp:4:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
3 | #include <vector>
+++ |+#include <climits>
4 | using namespace std;
events.cpp:27:48: error: no matching function for call to 'std::set<std::pair<int, int> >::lower_bound(<brace-enclosed initializer list>)'
27 | auto t = s.lower_bound({-INT_MAX,0});
| ^
In file included from /usr/include/c++/10/set:61,
from events.cpp:2:
/usr/include/c++/10/bits/stl_set.h:829: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<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; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<int, int>]'
829 | lower_bound(const key_type& __x)
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:829:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::pair<int, int>&'}
829 | lower_bound(const key_type& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:833: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<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; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<int, int>]'
833 | lower_bound(const key_type& __x) const
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:833:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::pair<int, int>&'}
833 | lower_bound(const key_type& __x) const
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:839: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> >]'
839 | lower_bound(const _Kt& __x)
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:839:2: note: template argument deduction/substitution failed:
events.cpp:27:48: note: couldn't deduce template parameter '_Kt'
27 | auto t = s.lower_bound({-INT_MAX,0});
| ^
In file included from /usr/include/c++/10/set:61,
from events.cpp:2:
/usr/include/c++/10/bits/stl_set.h:845: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> >]'
845 | lower_bound(const _Kt& __x) const
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:845:2: note: template argument deduction/substitution failed:
events.cpp:27:48: note: couldn't deduce template parameter '_Kt'
27 | auto t = s.lower_bound({-INT_MAX,0});
| ^
events.cpp:36:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
36 | if(pos<lift[j].size()&&pos<lift[lift[j][pos]].size()) {
| ~~~^~~~~~~~~~~~~~~
events.cpp:36:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
36 | if(pos<lift[j].size()&&pos<lift[lift[j][pos]].size()) {
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
events.cpp:60:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
60 | while(j<lift[s].size()&&events[lift[s][j]].second<events[e].second){ j++; u*=2;}
| ~^~~~~~~~~~~~~~~