Subsequence
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given two strings s and t. Check, or a string s is a subsequence of string t.
Input
Two nonempty string s and t, containing only letters and digits (|s| ≤ 100, |t| ≤ 300).
Output
If the string s is a subsequence of the string t, output two lines: "YES" (without the quotes) and the minimum amount of characters in a string of indices t (indexing starts at 0), which is made up of a string s.
If the string s is not a subsequence of the string t, output "NO" (without quotes).
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Input #4
Answer #4
Submissions 585
Acceptance rate 45%