Submit | All submissions | Best solutions | Back to list |
STRSRC2 - Simplest Pattern Search with Spaces |
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' and spaces. 1 <= size of pattern P <= 1000 and will contain only 'a'-'z' and spaces.
Output
Print 'Yes' if P is found is S else print 'No'.
Example
Input: 1
abc def
def
Output: Yes
Added by: | Rajesh Kumar |
Date: | 2014-08-24 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |