cf/mirror

Dynasty Puzzles

CF
191A1500· specialist2s256 MB⌨ stdin/stdout
#dp

Examples

Sample 1of 3
Input
3
abc
ca
cba
Output
6
Sample 2of 3
Input
4
vvp
vvp
dam
vvp
Output
0
Sample 3of 3
Input
3
ab
c
def
Output
1
191A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)