cf/mirror

Jumping Man

CF
2183F2500· grandmaster3s1024 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
3
abb
1 2
1 3
2
aa
1 2
4
ccbb
1 2
2 3
2 4
4
aaaa
1 4
4 2
2 3
10
cacbcccbac
1 2
2 3
3 4
2 5
1 6
2 7
3 8
4 9
8 10
Output
9 1 1
5 1
29 9 1 1
69 5 1 19
185 65 19 3 1 1 1 3 1 1
2183F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…