Problem D
Genetic Search
Technology has greatly changed the field of biology in the
last decade, since biological information can be digitized and
analyzed by computer. One of the most basic analysis tasks is
counting the number of occurrences (or near-occurrences) of a
search string
For this problem, you are given pairs of strings
-
Type 1:
, without any changes. -
Type 2: All unique strings that can be made by deleting one character from
(for example, AGC can become AG, AC, or GC). -
Type 3: All unique strings that can be made by inserting one character in
(for example, AG can become any of the following: AAG, GAG, CAG, TAG, AGG, ACG, ATG, AGA, AGC, or AGT).
If two or more different modifications of
Input
The input contains up to
Output
For each test case, output the number of occurrences of Type 1, then Type 2, then Type 3.
Sample Input 1 | Sample Output 1 |
---|---|
AGCT AGCTAGCT AAA AAAAAAAAAA AGC TTTTGT 0 |
2 4 2 8 9 7 0 0 0 |