Help with a data structure problem

Правка en3, от MOOONI, 2024-08-19 09:43:26

There is a vector of intervals (called v) that is initially empty. There are Q queries to process. two types of queries might appear:

  1. Insert an interval (x, y) to an arbitrary place in v. (1 <= x <= y <= 10 ^ 5)

  2. What is the last interval among the first t elements in v, that contains the number x?

the number of queries is at most 10 ^ 5

Теги data structures

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский MOOONI 2024-08-19 09:43:26 0 (published)
en2 Английский MOOONI 2024-08-19 09:41:57 29
en1 Английский MOOONI 2024-08-19 09:40:11 403 Initial revision (saved to drafts)