字符序列模式识别

Time Limit: 1000ms
Memory Limit: 32768KB
64-bit integer IO format: %lld      Java class name: Main

Description

试写一个算法,识别字符序列是否为形如‘子序列1&子序列2’模式的字符序列,其中子序列2是子序列1的逆序列,0<子序列字符串长度<1000,且都为小写字母。输出YES或者NO。

Input

一行字符序列

Output

YES或NO

Sample Input

hello&ollhe

Sample Output

NO

Source

Author

Admin
Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .