How to find a k-th bigger element in sequence

Revision en1, by Rhangel, 2017-06-08 02:23:40

Hello people of Codeforces :)

I was solving a problem that had two types of operations: 1 — Insert element X the sequence 2- What is the kth largest element of the sequence. How to solve this type of problem?

The sequence may have 10 ^ 5 elements, and may have 10 ^ 5 queries.

Tks. :D

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Rhangel 2017-06-08 02:23:40 354 Initial revision (published)