Problem 2416 · Hard

Sum of Prefix Scores of Strings

Count how many words share each prefix once, then a word score is the sum of the counts along its own prefixes.

Open the interactive visualisation