Entangled Substrings
1817F3500· legendary gm2s⌨ stdin/stdout
Examples
Sample 1of 4
Input
abba
Output
1
Sample 2of 4
Input
abacaba
Output
0
Sample 3of 4
Input
abcabcabcabc
Output
5
Sample 4of 4
Input
adamant
Output
82
58%
1817F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)