当前位置:网站首页>Copying DNA
Copying DNA
2022-06-25 06:01:00 【llvYeriji】
translate :
describe :
Evolution is a seemingly random process , It works in a way similar to some of the methods we use to obtain approximate solutions to hard combinatorial problems . Now you have to do something completely different .
Given the alphabet {A,C,G,T} Medium DNA character string S, Find and create another string T Minimum number of replication operations required . You can reverse the string you copied , And from S And your clip copy part T. You can always put these parts together . You can only copy part of T A continuous part of , And it must be in the end T Use all copied strings in . in example :
from S = “ACTG” establish T = “GTACTATTATA”
1. By getting from S Copy and reverse in “TG” To get GT.......
2. By getting from S Copy the “AC” To get GTAC.......
3. By from part T Copy the “TA” To get GTAC...TA...
4. By from part T Copy and reverse in “TA” To get GTAC...TAAT.
5. By from part T Copy the “AAT” To get GTACAATTAAT.
Input :
The first line of input gives an integer ,1 <= t <= 100, Represents the number of test cases . then , For each test case , A row contains a length of 1 <= m <= 18 String S, And contains a length of 1 <= n <= 18 String T A line .
Output :
Output from for each test case S establish T Number of replication operations required , If it can't be done , The output “ impossible ”.
边栏推荐
- Getting started with Silverlight development 1
- MySQL uses the where condition to find strange results: solve
- SAP ui5 beginner tutorial No. 27 - unit test tool quNit introduction trial version for SAP ui5 application
- Mongodb delete data
- Try with resource close resource flow
- 钱堂教育的证券账户安全吗?靠谱吗?
- Summary of 6 common methods of visual deep learning model architecture
- 手机开户一般哪个证券公司好?手机开户是安全么?
- Code learning-cvpr2020 unsupervised domain adaptive semantic segmentation: intra advance
- Mongodb basic concept learning - set
猜你喜欢

Distributed solar photovoltaic inverter monitoring

Get the first letter of Chinese phonetic alphabet in Excel and capitalize it

Understanding the dynamic mode of mongodb document
Part 33 of SAP ui5 application development tutorial - trial version of responsiveness of SAP ui5 applications

Timed thread pool

【LeetCode】40. Combined summation II (2 strokes of wrong questions)

Classic usage of the sumproduct function
SAP ui5 tutorial for beginners part XXVI - detailed steps for using OData service with mock server trial version
Linus' speech recordings, which were lost in 1994, were made public

Excel splits a worksheet into multiple worksheets according to conditions, and how to split multiple worksheets into independent tables
随机推荐
No one reads the series. Source code analysis of copyonwritearraylist
Which securities company is good for opening a mobile account? Is it safe to open a mobile account?
Invalid bound statement (not found)
SAP ui5 beginner tutorial No. 27 - unit test tool quNit introduction trial version for SAP ui5 application
Interviewer: what is an iterator? What is the relationship between async await and iterators?
Distributed solar photovoltaic inverter monitoring
Kyma application connectivity feature introduction
SAP Fiori tools and corresponding cli (command line interface)
SAP ui5 tutorial for beginners part XXVI - detailed steps for using OData service with mock server trial version
C switch nested syntax
Go uses channel to control concurrency
A method of automatic continuation of previous tables in word table
SAP ui5 Application Development Tutorial Part 30 - parameter transfer in the routing process of SAP ui5
Technology Review: Interpretation of cloud native architecture trend in 2022
The e-book "action guide for large organizations to further promote zero code application platform" was officially released!
The locally developed SAP ui5 application is deployed to the ABAP server to perform error analysis
What is hybrid web containers for SAP ui5
【LeetCode】40. Combined summation II (2 strokes of wrong questions)
SQL get current time
Multithreading and thread pool