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

Автор ILoveVanshita, история, 3 года назад, По-английски

NOTE — This problen is not the from any ongoing contest. You are given an array of N integers. X[i] is the number of distinct values that occur to the left of index i and not on or to the right of index i. Y[i] is the number of distinct values that occur to the right of index i and not on or to the left of index i. Determine the absolute difference of X[i] , Y[i] for every index 1 <= i <= N. ****Constraint**** 1<=T<=10 1<=N<=2*10^5 -10^9<=Ai<=10^9

Полный текст и комментарии »

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

Автор ILoveVanshita, история, 3 года назад, По-английски

Can you plz. help me finding problems that use concept of partial sum. I googled it but unable to find.

Полный текст и комментарии »

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