#Lutece1856. Find Substring
Find Substring
Migrated from Lutece 1856 Find Substring
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Given a string S consisting of lower-case English letters only, your task is to find out if there is a substring which the number of '',''.. are ?
Input
The first line of the input contains a string ()
The next line contains integers ().
Output
If there is a substring meets the above conditions, print the word Yes
Otherwise print the word No
on a single line.
Samples
abcde
0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Yes
abcde
0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
No
Resources
The 16th UESTC Programming Contest Preliminary