STRSRC - Simplest Pattern Search
Given a String S and a pattern P, check whether P exists in S or not.
Input
In first line is the number of test cases T. 1 <= T <=50.
Next 2*T lines contains a string S and string P.
1 <= size of string S <= 1000 and it will contain only 'a'-'z'. 1 <= size of pattern P <= 1000 and will contain only 'a'-'z'.
Output
Print 'Yes' if P is found is S else print 'No'.
Example
Input: 1
abc
b
Output: Yes
hide comments
nitant:
2014-08-24 16:27:54
output should be in the same line or in separate lines??
|
Added by: | Rajesh Kumar |
Date: | 2014-08-23 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |