Problem 2223 · Hard
Sum the common-prefix scores of every suffix of the string.
Open the interactive visualisation