diff options
author | Jack Sangdahl <[email protected]> | 2024-12-18 10:56:03 -0700 |
---|---|---|
committer | Jack Sangdahl <[email protected]> | 2024-12-18 10:56:03 -0700 |
commit | b4c9537fd8f13fcfc990f03b3731950fb6ae3759 (patch) | |
tree | 6384adb4f7dd8398bb61eb335ee253fac14024af /introductory_problems/readme.md | |
parent | 3d1f61c860eed7b034d5673197cdc04b5555f8e5 (diff) | |
download | cses-b4c9537fd8f13fcfc990f03b3731950fb6ae3759.tar.gz cses-b4c9537fd8f13fcfc990f03b3731950fb6ae3759.zip |
1069. repetitions
Diffstat (limited to 'introductory_problems/readme.md')
-rw-r--r-- | introductory_problems/readme.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/introductory_problems/readme.md b/introductory_problems/readme.md index d276f99..78e52cb 100644 --- a/introductory_problems/readme.md +++ b/introductory_problems/readme.md @@ -13,3 +13,10 @@ You are given all numbers between `1, 2, ..., n` except one. Your task is to fin **Input**: The first input line contains an integer `n`. The second input line contains `n - 1` numbers. Each number is distinct and between 1 and `n` (inclusive). (Example: 5`\n`2 3 1 5) **Output**: Print the missing number. (Example: 4) + +### Repetitions +You are given a DNA sequence: a string consisting of 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. (Example: ATTCGGGA) + +**Output**: Print one integer: the length of the longest repetition. (Example: 3) |