Binary Indexed Tree Problem from SPOJ (TEMPLEQ — Temple Queues)

Revision en2, by Tobby_And_Friends, 2016-10-21 22:51:19

I do understand the query, i.e, query of type 1 A means adding 1 to the value at A, query of type 2 X means how many queue has pilgrims of length >= X and query of type 3 Y means to subtract 1 from each of the queues having >= Y pilgrims. I'm just not sure how to process my original arrays so that I can easily update using BIT. Any hint will be really appreciated.

Problem Link: http://www.spoj.com/problems/TEMPLEQ/

Tags binary indexed tree, spoj

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Tobby_And_Friends 2016-10-21 22:51:19 57 Tiny change: 'reciated. ' -> 'reciated. \n\nProblem Link: http://www.spoj.com/problems/TEMPLEQ/ '
en1 English Tobby_And_Friends 2016-10-21 22:50:15 431 Initial revision (published)