SPOJ POSTERS SEGMENT TREES WA

Revision en2, by sanket407, 2016-02-13 18:30:50

Hey

problem: http://www.spoj.com/problems/POSTERS/

Used seg trees to store all posters from position 1 to max of queries.

Then Lazy propogation is used and after all poster queries did a last passing of lazy values till bottom.

Then after all poster queries counted values at bottom nodes (stored in wall[])

Can anyone come up with test cases where my code getting WA?

sol: http://pastebin.com/KYcUvpku

Tags segtrees

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English sanket407 2016-02-13 18:30:50 44
en1 English sanket407 2016-02-13 18:29:38 415 Initial revision (published)