cf/mirror

Number of Subsequences

CF
1426F2000· candidate master1s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
6
ac?b?c
Output
24
Sample 2of 4
Input
7
???????
Output
2835
Sample 3of 4
Input
9
cccbbbaaa
Output
0
Sample 4of 4
Input
5
a???c
Output
46
1426F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)