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

Автор bihariforces, история, 21 месяц назад, По-английски

https://atcoder.jp/contests/abc290/tasks/abc290_e

We have a variation of this, find sum of $$$F(x)$$$ for every subsequence of a string, and should be better than $$$O(N^2)$$$.

I can only think of $$$O(N^2)$$$ approach which involves finding individual contribution of every unequal pair of characters, can we optimize this?

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