Let countUniqueChars(t) denote the number of unique characters in a string t, which is the count of characters that appear exactly t.
Given a string s, return the sum of countUniqueChars(t) for every substring t of s.
Notice that identical substrings appearing at different positions in s are counted separately.
Constraints:
s.length
s consists of uppercase English letters only.
Let countUniqueChars(t) denote the number of unique characters in a string t, which is the count of characters that appear exactly t.
Given a string s, return the sum of countUniqueChars(t) for every substring t of s.
Notice that identical substrings appearing at different positions in s are counted separately.
Constraints:
s.length
s consists of uppercase English letters only.