how to convert this(459d ) problem to segment tree/fw tree problem?

Правка en1, от atlasworld, 2018-12-27 10:50:12

in problem 459d we have to find the i,j pairs for which f(1,i,a[i]) > f(j,n,a[j]])

we will first count left[i] i.e frequency of a[i] in the range [1,i] and r[i] i.e freq. of a[i] from [i,n] .

after that what to do .. how to solve it in O(n) time ..

please help !

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский atlasworld 2018-12-27 10:50:12 389 Initial revision (published)