Problem 828 · Hard
Count each character occurrence by how many substrings contain it as their only copy.
Open the interactive visualisation