Description

There is now a string s consisting of only numbers and lowercase letters.

If the string s is interesting, then s must be split into several substrings, each substring satisfies the beginning of the number, and the number represents the number of characters after it. For example, s = “4g12y6hunter”, we can divide it into “4g12y” and “6hunter”, so the string is interesting.

If s is an interesting string, output “yes”, otherwise output “no”

Example:

s = "124gray6hunter",return "yes"

we can divide it into "12", "4gray", "6hunter".

s = "31ba2a" ,return "no"

Read More

Author's picture

SelFree

城市永远年轻,而我们终将老去

Programer

ChengDu·China