svg_af's blog

By svg_af, history, 8 years ago, In English

Hello there

I'm trying to solve this problem

I'm keeping a persistent segment tree from end to begin for the cnt[] array which keeps the number of results of indexes so far

and then for each elemnt in array i query on the tree next to the number and get how many indexes with smaller results

Here is my submission

is 10^6 too much for a persistent segment tree, or am i doing something wrong ?

Thanks in advance :D

  • Vote: I like it
  • +1
  • Vote: I do not like it