nicegift.cpp: In function 'void solve()':
nicegift.cpp:29:18: warning: comparison of integer expressions of different signedness: 'std::set<std::pair<long long int, long long int>, std::greater<std::pair<long long int, long long int> > >::size_type' {aka 'long unsigned int'} and 'll' {aka 'long long int'} [-Wsign-compare]
29 | while(st.size() >= k){
| ~~~~~~~~~~^~~~
nicegift.cpp:35:18: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} and 'll' {aka 'long long int'} [-Wsign-compare]
35 | if(del.size() == k) break;
| ~~~~~~~~~~~^~~~
nicegift.cpp:39:71: error: no matching function for call to 'std::set<std::pair<long long int, long long int>, std::greater<std::pair<long long int, long long int> > >::erase(std::set<std::pair<long long int, long long int>, std::greater<std::pair<long long int, long long int> > >::reverse_iterator)'
39 | while(st.size() && (st.rbegin() -> first) == 0) st.erase(st.rbegin());
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from nicegift.cpp:1:
/usr/include/c++/10/bits/stl_set.h:654:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = std::pair<long long int, long long int>; _Compare = std::greater<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<long long int, long long int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::greater<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::greater<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator]'
654 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:654:28: note: no known conversion for argument 1 from 'std::set<std::pair<long long int, long long int>, std::greater<std::pair<long long int, long long int> > >::reverse_iterator' {aka 'std::reverse_iterator<std::_Rb_tree_const_iterator<std::pair<long long int, long long int> > >'} to 'std::set<std::pair<long long int, long long int>, std::greater<std::pair<long long int, long long int> > >::const_iterator' {aka 'std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::greater<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator'}
654 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:684:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = std::pair<long long int, long long int>; _Compare = std::greater<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<long long int, long long int> >; std::set<_Key, _Compare, _Alloc>::size_type = long unsigned int; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<long long int, long long int>]'
684 | erase(const key_type& __x)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:684:29: note: no known conversion for argument 1 from 'std::set<std::pair<long long int, long long int>, std::greater<std::pair<long long int, long long int> > >::reverse_iterator' {aka 'std::reverse_iterator<std::_Rb_tree_const_iterator<std::pair<long long int, long long int> > >'} to 'const key_type&' {aka 'const std::pair<long long int, long long int>&'}
684 | erase(const key_type& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:706:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = std::pair<long long int, long long int>; _Compare = std::greater<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<long long int, long long int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::greater<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::greater<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator]'
706 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:706:7: note: candidate expects 2 arguments, 1 provided