Reversibly Cyclic Strings
시간 제한1초메모리 제한1024 MB
문자열 s의 모든 진부분 문자열 t에 대해 t의 뒤집은 문자열이 s의 어떤 회전에서 부분 문자열로 나타나는지 판정합니다.
문제
A string is a Cyclic Substring of a string if there is some rotation of such that is a substring of that rotation of .
For example, if is fatcat, then atc and atf are both Cyclic Substrings of . However, act is not a Cyclic Substring of .
A string is Internally Reversibly Cyclic if, for every proper substring of , the reverse of is a Cyclic Substring of .
Given a string, determine if it is Internally Reversibly Cyclic.
입력
The single line of input contains a string (, )
출력
Output a single integer, which is if is Internally Reversibly Cyclic, otherwise.