Problem 1923 · Hard

Longest Common Subpath

Binary search the answer length, keep the windows of the first path that appear in every other path using rolling hashes, and verify each hit.

Open the interactive visualisation