#P406. 【例70.1】 字符串移位包含问题
【例70.1】 字符串移位包含问题
Description
For a string, a cyclic shift operation is defined as: moving the first character of the string to the end to form a new string.
Given two strings and , determine if one string is a substring of the other string after some number of cyclic shifts. For example, is a substring of , which is obtained by shifting twice, while and cannot be obtained through multiple shifts to make one string a substring of the other.
Input Format
One line containing two strings separated by a single space. The strings contain only letters and digits, with length not exceeding .
Output Format
If one string is a substring of the other string after some number of cyclic shifts, output ""; otherwise, output "".
Sample
AABCD CDAAtrue