Description
We already know that the DNA sequence is composed of four elements: A, T, C, and G. Now you work on the given Biological DNA sequence, we want to know whether another virus DNA sequence exists in this sequence. If so, yes is output; otherwise, no is output.
-
Input
-
The first line of the input data contains an integer T, indicating that there are T groups of data;
The format of each group of test data is as follows:
The first line contains a string S1 consisting of characters A, T, C, and G. The length cannot exceed 100,000.
The second line contains a string S2 consisting of characters A, T, C, and G. The length cannot exceed 1,000.
-
Output
-
If String S2 is a child string of S1, output yes; otherwise, output No
Call the find function in STL.
# Include <iostream> # include <string> # include <cstdio> using namespace STD; int main () {int number, Te; string a; string B; scanf ("% d", & number); For (TE = 1; te <= number; Te ++) {CIN> A; CIN> B; if (. find (B) <= Number) printf ("Yes \ n"); elseprintf ("NO \ n ");}}