ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Алгоритмы и Структуры Данных > задача:


13. Repetitions

Задачи сборника

• 05. Trailing Zeros
• 06. Премьер-министр
• 07. B. Влюбленная Duff
• 08. B. Песня о любви
• 09. Weird Algorithm
• 10. А. Любовь «А»
• 11. Missing Number
• 12. D. Love-Hate
• 13. Repetitions
• 14. Increasing Array
• 15. Bit Strings
• 16. Josephus Queries
• 17. Number Spiral
• 18. Apartments
• 19. Ferris Wheel
• 20. Two Sets
• 21. Distinct Numbers

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Сложность Альфа


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.

Input
The only input line contains a string of n characters.

Output
Print one integer: the length of the longest repetition.

Constraints
1≤n≤106

Example
Input:
ATTCGGGA

Output:
3

Для отправки решений необходимо выполнить вход.

www.contester.ru