| 10 | char S[maxN]; |
| 11 | |
| 12 | int main(){ |
| 13 | scanf(" %s", S); |
| 14 | N = (int) strlen(S); |
| 15 | for(int i = 0; i < N; i++){ |
| 16 | int c = (int) (S[i] - 'a'); |
| 17 | dp[c]++; |
| 18 | for(int j = 0; j < 26; j++) |
| 19 | if(j != c) |
| 20 | dp[c] = (dp[c] + dp[j]) % MOD; |
| 21 | } |
| 22 | |
| 23 | for(int i = 0; i < 26; i++) |
| 24 | tot = (tot + dp[i]) % MOD; |
| 25 | printf("%lld\n", tot); |
| 26 | } |
nothing calls this directly
no outgoing calls
no test coverage detected