cf/mirror

Collapsing Strings

CF
1902E1900· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3
aba
ab
ba
Output
20
Sample 2of 2
Input
5
abab
babx
xab
xba
bab
Output
126
1902E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…