BdOI 2013 National Problem 1

Discuss everything related to IOI here. For more general or advanced topics use CS forum.

Moderators: bristy1588, Labib

User avatar
bristy1588
Posts: 92
Joined: Sun Jun 19, 2011 10:31 am

BdOI 2013 National Problem 1

Unread post by bristy1588 » Tue Jan 14, 2014 10:35 pm

DNA is one of the major macromolecules that are essential for all known forms of life.
Genetic information is encoded as a sequence of nucleotides in DNA. There are four types of
nucleotide in DNA, Adenine (A), Guanine (G), Cytosine (C) and Thymine (T). These four
nucleotides are expressed as A, G, C and T respectively.
Little sheep is interested in DNA sequencing and found a sequence of nucleotides. He
wonders whether this is a DNA or not. Help him to discover DNA.
You will be given a string representing the sequence, tell him whether it is DNA or not. The
sequence will be a DNA sequence if it only contains A, G, C and T.

INPUT
First line of the input contains an integer $T (T<100)$, number of test cases. Each of the next T
lines will represent one test case. Each test case consists of a single string S (length of S is
less than 100) of uppercase letters ($A$ - $Z$).

OUTPUT
For each test case, print the test case number starting from 1 and $YES$, if the sequence S is
DNA, $NO$, otherwise.


SAMPLE INPUT

Code: Select all

4
AC
WATLE
GOTAC
ACGTAGT
SAMPLE OUTPUT

Code: Select all

Case 1: YES
Case 2: NO
Case 3: NO
Case 4: YES

NOTE
If anyone has any trouble with their code please post your code here using the code option.
Bristy Sikder

Post Reply