#D. 最大的子串(Repetitions)

    Type: FileIO (repet) 1000ms 256MiB

最大的子串(Repetitions)

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

You are given a DNA sequence: a string consisting of characters A, C, G, and T. Your task is to find the longest repetition in the sequence. This is a maximum-length substring containing only one type of character.

Format

Input

The only input line contains a string of n characters.

Output

Print one integer: the length of the longest repetition.

Samples

ATTCGGGA
3

Limitation

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

Introductory Problems

Not Attended
Status
Done
Rule
Ledo
Problem
9
Start at
2024-8-13 9:00
End at
2024-8-13 12:18
Duration
3.3 hour(s)
Host
Partic.
4