Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Copying DNA
Description Evolution is a seemingly random process which works in a way which resembles certain approaches we use to get approximate solutions to hard combinatorial problems. You are now to do something completely different. Given a DNA string - Get GT......... by copying and reversing "TG" from
*S*. - Get GTAC....... by copying "AC" from
*S*. - Get GTAC...TA.. by copying "TA" from the partial
*T*. - Get GTAC...TAAT by copying and reversing "TA" from the partial
*T*. - Get GTACAATTAAT by copying "AAT" from the partial
*T*.
Input The first line of input gives a single integer, 1 ≤ Output Output for each test case the number of copy operations needed to create Sample Input 5 ACGT GTAC A C ACGT TGCA ACGT TCGATCGA A AAAAAAAAAAAAAAAAAA Sample Output 2 impossible 1 4 6 Source |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator