-
Itβs time for a dental visit! Your dentist happens to be interested in both DNA strands and problem-solving. While the dentist is busy tinkering with your teeth, they give you the following problem.
You are given an $N$ long substring of a DNA string, where all $N$ characters are guaranteed to be one of G, T, C, or A.
You want to find another DNA substring of length $N$ that differs from the given DNA string at each position.
Can you find the lexicographically smallest of all these possible DNA strings?
Input
The first line of input contains the integer $N$ ($1 \leq N \leq 1000$). The second line contains a string with $N$ characters, where all characters are either G, T, C, or A.
Output
Write out a string with $N$ characters, where all characters must be G, T, C, or A. This string should differ from the given string at every position.
Points
You can recieve up to 100 points depending on how well you solve the problem.
Note: In this problem, the size of the file you submit cannot exceed 1 kB.
Sample Input 1 Sample Output 1 1 T
A
Sample Input 2 Sample Output 2 5 ACAGT
CACAA
-
To solve the problems, you can either start a virtual contest or register for regular practice. A virtual contest simulates a participation in the original contest with a duration of 02:00:00, while regular practice lets you submit solutions without any constraints.
You must log in to register. - A Accelerated Learning
- D Divisibility test
- E Easy Query
- F Fact Check
- G Open Wide
- H High Noon
- K You wouldn't kill a kitten
- M Make Kattis Happy
- P Problemhunt?
- S Solution Presentation