#P3621. Prefix-Substring LCS

Prefix-Substring LCS

3
abcb
acb
3 0 3
4 1 3
2 1 2
2
2
0