|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||512 MB||8||7||7||100.000%|
Thuc likes finding cyclic shifts of strings. A cyclic shift of a string is obtained by moving characters from the beginning of the string to the end of the string. We also consider a string to be a cyclic shift of itself. For example, the cyclic shifts of
Given some text, T, and a string, S, determine if T contains a cyclic shift of S.
The input will consist of exactly two lines containing only uppercase letters. The first line will be the text T, and the second line will be the string S. Each line will contain at most 1000 characters.
yes if the text, T, contains a cyclic shift of the string, S. Otherwise, output
CDEAB is a cyclic shift of
ABCDE and it is contained in the text
The cyclic shifts of
AAB. None of these shifts are contained in the text