This problem that I meet very often: there is a set, in which we can add element, also we can erase any element. The problem is to count the number of elements less then x.
Sure, the problem can be solved with treap or something like that, but can it be solved with std::set or other already released data structures?
Any ideas?