any hint to solve lightoj 1187

Revision en1, by CrapCoder, 2016-06-18 17:16:40

i'm stuck on this problem

http://lightoj.com:81/volume/problem/1187

forum says there is an O(n) greedy and an nlog(n) solution with BIT/segtree .can you give any hint or idea so i can get closer to solve this.

Tags lightoj, data structure, segment tree, binary indexed tree, greedy

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English CrapCoder 2016-06-18 17:16:40 246 Initial revision (published)