#D. 最大的子串(Repetitions)

    文件IO (repet) 1000ms 256MiB

最大的子串(Repetitions)

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

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

训练题单一

未認領
狀態
已結束
題目
9
開始時間
2024-10-11 0:00
截止時間
2024-10-26 23:59
可延期
24 小時