Variation of Atcoder Beginner Contest Problem — Make it Palindrome

Revision en1, by bihariforces, 2023-04-05 21:35:36

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?

Tags combinatorics, palindrome, optimization

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English bihariforces 2023-04-05 21:35:36 384 Initial revision (published)