Data structures problem

Revision en4, by protypuns, 2015-10-23 17:40:47

I was solving a segment tree problem in witch you are given:

Update L, R. — updates [L;R] with the value of the current operation (1, 2, ... M)

Query. — count different elements in [0; N]

N <= 10^7

M <= 4 * 10^4

I couldn't come with an aproach. I will be really happy if someone helps me with it. Thankd in advance! :)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English protypuns 2015-10-23 17:40:47 12
en3 English protypuns 2015-10-23 17:40:08 32 Tiny change: 'ments in [N; M]\n\nI coul' -> 'ments in [0; N]\n\nN <= 10^7\nM <= 4 * 10^4\n\nI coul'
en2 English protypuns 2015-10-23 17:38:48 4
en1 English protypuns 2015-10-23 17:38:22 344 Initial revision (published)