当前位置:网站首页>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 ”.
边栏推荐
- What changes have taken place in the project file after SAP ui5 tools ran the Fiori add deploy config command
- Understanding the dynamic mode of mongodb document
- Understanding of process, thread, task queue, event loop, macro task, micro task, execution stack and other concepts in JS
- [interview with a large factory] meituan had two meetings. Was there a surprise in the end?
- Kyma application connectivity feature introduction
- Jz-066- motion range of robot
- SAP ui5 application development tutorial XXIX - Introduction to routing and navigation functions of SAP ui5 trial version
- Trial version of routing history and routing back and history of SAP ui5
- Part 34 of SAP ui5 application development tutorial - device adaptation of SAP ui5 application based on device type
- 16 application problem solving
猜你喜欢

MySQL uses the where condition to find strange results: solve

MySQL operation JSON

Soft exam information system project manager_ Management Science (Operations Research) -- senior information system project manager of soft test 033
Learn the interface test, see it is very good, and make a note

Laravel8 fill data

05 virtual machine stack

Three tier architecture experiment

Mongodb delete data

Trouble of setting table property to null

ERDAS 9.2 installation tutorial
随机推荐
PAT (Advanced Level) Practice 1025
Trouble of setting table property to null
Curl command – file transfer tool
SQL get current time
Oracle SQL statement operand: rounding, rounding, differentiation and formatting
[interview with a large factory] meituan had two meetings. Was there a surprise in the end?
Noi Mathematics: Dirichlet convolution
[untitled]
A method of automatic continuation of previous tables in word table
MySQL tuning -- 02 -- slow query log
SAP Fiori tools and corresponding cli (command line interface)
HashSet implementation class
Synchonized introduction
C switch nested syntax
DOM proficient? What is the difference between node and elment?
Click to send text messages without response is a common problem for many users in building the elegant grass Dragonfly Q system - solve the problem of clicking to send text messages without response
Ping command – test network connectivity between hosts
What is SAP sup - Sybase unwired platform
Linus' speech recordings, which were lost in 1994, were made public
Jz-066- motion range of robot