cf/mirror

Subsequence Permutation

CF
1552A800· newbie1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
4
3
lol
10
codeforces
5
aaaaa
4
dcba
Output
2
6
0
4
1552A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)