重复
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.
题目背景
翻译自 CSES-1069 题。
题目描述
你有一个 DNA 序列:一个由字符 A
, C
, G
和 T
组成的字符串。你的任务是找到序列中最长的重复子串。
换句话说,你需要找到最大长度的一个子串,使得这个子只包含同种类型的字符。
输入格式
输入一行只包含 A
, C
, G
和 T
四种字符并且长度为 的字符串。
输出格式
输出一行一个整数表示最长的重复子串。
样例
ATTCGGGA
3
说明/提示
。
CSES练习一 枚举、模拟、数学
- Status
- Done
- Problem
- 19
- Open Since
- 2025-5-1 0:00
- Deadline
- 2025-6-2 23:59
- Extension
- 24 hour(s)