Блог пользователя svg_af

Автор svg_af, история, 9 лет назад, По-английски

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

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится