当前位置:网站首页>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 ”.
边栏推荐
- Use of arrays tool class
- SAP ui5 beginner tutorial 25 - using proxy server to solve the cross domain problem of SAP ui5 application accessing remote OData service trial version
- Websocket in the promotion of vegetable farmers
- Guava new collection type
- Word quickly makes multiple single-sided table labels, number plates, etc
- Volatile and JMM memory models
- Day17 (set)
- Farewell to Lombok in 996
- 【LeetCode】40. Combined summation II (2 strokes of wrong questions)
- SAP ui5 beginner tutorial No. 28 - Introduction to the integration test tool OPA for SAP ui5 applications
猜你喜欢

Semantic segmentation cvpr2020 unsupervised intra domain adaptation for semantic segmentation through self supervision
Use generator-easy-ui5 to quickly create the engineering structure of SAP ui5 applications

What is the use of the subprocess module

Gavin's insight on transformer live class - line by line analysis and field experiment analysis of insurance BOT microservice code of insurance industry in the actual combat of Rasa dialogue robot pro

Code learning-cvpr2020 unsupervised domain adaptive semantic segmentation: intra advance
SAP ui5 application development tutorial 32 - how to create a custom SAP ui5 control
Vscode voice notes to enrich information (medium)

Volatile and JMM memory models

By inserting a section break, the word header, footer, and page number can start from any page
SAP ui5 application development tutorial XXIX - Introduction to routing and navigation functions of SAP ui5 trial version
随机推荐
A method of automatic continuation of previous tables in word table
Curl command – file transfer tool
The simplest way to tell you is to hash and not hash
Go language map sorting (key/value sorting)
Day19 (variable parameter, enhanced for loop traversal, generic wildcard <? >, TreeSet, linkedhashset, nested traversal of sets, set set, static import,)
Day22(File,DiGui,FileOutputStream)
MySQL -- optimize query statements and use not in with cases
Technology Review: Interpretation of cloud native architecture trend in 2022
Use of arrays tool class
Ping command – test network connectivity between hosts
Processes and threads - concepts and process scheduling
JMeter stress testing and agent recording
Introduction to MySQL test run test framework
Part 33 of SAP ui5 application development tutorial - trial version of responsiveness of SAP ui5 applications
Semantic segmentation cvpr2020 unsupervised intra domain adaptation for semantic segmentation through self supervision
Lesson 8: FTP server setup and loading
Day13 (inner class, anonymous inner class, API common class)
Day21 performance test process
ArcGIS Engine + Visual Studio installation tutorial
PHP output (print) log to TXT text