use of BIT in HackerEarth problem

Revision en1, by abhj, 2020-06-13 08:47:47 is the link of the problem. It is a nice one from DSA June 2020 contest. Though I barely managed to land 5th in the contest, I felt disappointed on not being able to use BIT efficiently here. I know the solution for tighter limits on A[i] like 0<=A[i]<=10. Please help me.

Tags #segmenttree, #set


  Rev. Lang. By When Δ Comment
en1 English abhj 2020-06-13 08:47:47 394 Initial revision (published)