CF432D Prefixes and Suffixes
Description
You have a string $ s=s_{1}s_{2}...s_{|s|} $ , where $ |s| $ is the length of string $ s $ , and $ s_{i} $ its $ i $ -th character.
Let's introduce several definitions:
- A substring $ s[i..j] $ $ (1
Input Format
The single line contains a sequence of characters $ s_{1}s_{2}...s_{|s|} $ $ (1
Output Format
In the first line, print integer $ k $ $ (0