100 atcoder#ABC279B. [ABC279B] LOOKUP
[ABC279B] LOOKUP
Score : points
Problem Statement
You are given strings and consisting of lowercase English letters. Determine whether is a (contiguous) substring of .
A string is said to be a (contiguous) substring of if and only if can be obtained by performing the operation below on zero or more times.
- Do one of the following.- Delete the first character in .
- Delete the last character in .
- Delete the first character in .
- Delete the last character in .
For instance, tag is a (contiguous) substring of voltage, while ace is not a (contiguous) substring of atcoder.
Constraints
- and consist of lowercase English letters.
- ( denotes the length of a string .)
Input
The input is given from Standard Input in the following format:
Output
If is a (contiguous) substring of , print Yes; otherwise, print No.
voltage
tag
Yes
tag is a (contiguous) substring of voltage.
atcoder
ace
No
ace is not a (contiguous) substring of atcoder.
gorilla
gorillagorillagorilla
No
toyotasystems
toyotasystems
Yes
It is possible that .