segments.cpp:6:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main (){
| ^~~~
segments.cpp: In function 'int main()':
segments.cpp:21:26: error: no matching function for call to 'std::set<long long int>::lower_bound()'
21 | if(s.lower_bound() != s.end())y -= z;
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from segments.cpp:1:
/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 = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator; std::set<_Key, _Compare, _Alloc>::key_type = long long int]'
829 | lower_bound(const key_type& __x)
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:829:7: note: candidate expects 1 argument, 0 provided
/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 = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator; std::set<_Key, _Compare, _Alloc>::key_type = long long int]'
833 | lower_bound(const key_type& __x) const
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:833:7: note: candidate expects 1 argument, 0 provided
segments.cpp:19:13: warning: unused variable 'q' [-Wunused-variable]
19 | int q = *s.lower_bound(z);
| ^