Блог пользователя PrimeChalishkanchik

Автор PrimeChalishkanchik, история, 10 месяцев назад, По-русски

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?

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
10 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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