cf/mirror

Hossam and (sub-)palindromic tree

CF
1771D2100· master1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
2
5
abaca
1 2
1 3
3 4
4 5
9
caabadedb
1 2
2 3
2 4
1 5
5 6
5 7
5 8
8 9
Output
3
5
1771D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…