Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #include <ext/pb_ds/assoc_container.hpp>
- #include <ext/pb_ds/tree_policy.hpp>
- using namespace std ;
- using namespace __gnu_pbds;
- typedef tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
- signed main(){
- int id = 0;
- ordered_set s;
- s.insert({0, id++});
- s.insert({0, id++});
- s.insert({0, id++});
- s.insert({0, id++});
- cout << int(s.size()) << endl;
- s.erase(s.lower_bound(make_pair(0, -1)));
- cout << int(s.size()) << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement