PrimeChalishkanchik's blog

By PrimeChalishkanchik, history, 10 months ago, translation, In English

Good afternoon guys, I recently started working with the structure "Ordered Set" and "Ordered Muilti-set", and I noticed that in the second it is not possible to delete elements.

How it looks in my code:

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;

#define order_set tree<int, null_type,less, rb_tree_tag,tree_order_statistics_node_update>

So if you know what the problem is, could you help?

  • Vote: I like it
  • +1
  • Vote: I do not like it

»
10 months ago, # |
  Vote: I like it 0 Vote: I do not like it

first of all, to define an ordered multiset, you need to write:

#define order_set tree<int, null_type, less_equal, rb_tree_tag, tree_order_statistics_node_update>

second of all, see this: https://codeforces.net/blog/entry/88193#comment-765591