Help in Segment Tree Problem(HELPR2D2 — Help R2-D2!)

Правка en1, от ritik_patel05, 2020-04-17 15:29:09

Problem : HELPR2D2 — Help R2-D2!

Solution : Link

Approach : I stored in each leaf node K(Volume left to use) and in the parent node, I summed up the volume of children's node. For querying, I try to go as much left as I can and update the volume used. I cross-checked with several cases. But cannot find where it's going wrong on submission.

If someone has solved this question, I really appreciate your help. Thank you!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ritik_patel05 2020-04-17 15:29:09 578 Initial revision (published)