GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

Wednesday 15 June 2022

[Solution] DNA Storage CodeChef Solution | CodeChef Problem Solution 2022


For encoding an even-length binary string into a sequence of ATC, and G, we iterate from left to right and replace the characters as follows:

  • 00 is replaced with A
  • 01 is replaced with T
  • 10 is replaced with C
  • 11 is replaced with G

Given a binary string S of length N (N is even), find the encoded sequence.

Input Format

  • First line will contain T, number of test cases. Then the test cases follow.

Solution Click Below:-  CLICK HERE

  • Each test case contains two lines of input.
  • First line contains a single integer N, the length of the sequence.
  • Second line contains binary string S of length N.

Output Format

For each test case, output in a single line the encoded sequence.

Burgers CodeChef Solution

Waiting Time CodeChef Solution

DNA Storage CodeChef Solution

Joining Date CodeChef Solution

Distinct Palindrome CodeChef Solution

The Optimal Pairs CodeChef Solution

Make them Equal CodeChef Solution

Permutation AND CodeChef Solution

Note: Output is case-sensitive.

Constraints

  • 1T100
  • 2N103
  • N is even.
  • Sum of N over all test cases is at most 103.
  • S contains only characters 0 and 1

No comments:

Post a Comment