Problem 1316 · Hard

Distinct Echo Substrings

For each half-length, use a rolling hash to find positions where a block repeats right after itself, then count the distinct blocks.

Open the interactive visualisation