#2390. 最大的子串(Repetitions)

    ID: 2390 Type: FileIO (repet) 1000ms 256MiB Tried: 17 Accepted: 4 Difficulty: 9 Uploaded By: Tags>CSES Introductory Problems

最大的子串(Repetitions)

Description

给定一个DNA序列:一个由字符A、C、G和T组成的字符串。你的任务是找出序列中最长的重复序列。这是一个只包含一种字符类型的最大长度子字符串。

Format

Input

唯一的输入行包含 n 个字符。

Output

打印一个整数:最长重复次数的长度。

Samples

ATTCGGGA
3

Limitation

  • 1n10^6
  • Time limit: 1.00 s
  • Memory limit: 512 MB

Statistics

Related

In following contests:

Introductory Problems

陈国瑞测试

In following homework:

训练题单一