#K12611. Subsequence Checker
Subsequence Checker
Subsequence Checker
You are given two strings s and t. Your task is to determine whether t is a subsequence of s.
A string t is a subsequence of s if there exists a sequence of indices \(1 \leq i_1 < i_2 < \ldots < i_{|t|} \leq |s|\) such that \(s[i_k] = t[k]\) for every \(1 \leq k \leq |t|\). For example, if \(s = \texttt{abcde}\) and \(t = \texttt{ace}\), then t is a subsequence of s since the letters 'a', 'c', and 'e' appear in order in s.
Read the two strings from the input and output "Yes" if t is a subsequence of s, otherwise output "No".
inputFormat
The input consists of two lines. The first line contains the string s and the second line contains the string t. Both strings consist of lowercase English letters. It is guaranteed that their lengths are at least 0 and at most 105.
outputFormat
Output a single line containing either "Yes" if t is a subsequence of s or "No" otherwise.
## sampleabcde
ace
Yes