Logo
(追記) (追記ここまで)

24597번 - Reversibly Cyclic Strings 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB162887456.061%

문제

A string $t$ is a Cyclic Substring of a string $s$ if there is some rotation of $s$ such that $t$ is a substring of that rotation of $s$.

For example, if $s$ is fatcat, then atc and atf are both Cyclic Substrings of $s$. However, act is not a Cyclic Substring of $s$.

A string $s$ is Internally Reversibly Cyclic if, for every proper substring $t$ of $s,ドル the reverse of $t$ is a Cyclic Substring of $s$.

Given a string, determine if it is Internally Reversibly Cyclic.

입력

The single line of input contains a string $s$ (1ドル \le |s| \le 1{,}000,ドル $s \in \{\texttt{a}-\texttt{z}\}^*$)

출력

Output a single integer, which is 1ドル$ if $s$ is Internally Reversibly Cyclic, 0ドル$ otherwise.

제한

예제 입력 1

ccca

예제 출력 1

1

예제 입력 2

eeaafbddfaa

예제 출력 2

0

힌트

출처

ICPC > Regionals > North America > Pacific Northwest Regional > 2021 ICPC Pacific Northwest Region > Division 1 H번

ICPC > Regionals > North America > Pacific Northwest Regional > 2021 ICPC Pacific Northwest Region > Division 2 U번

  • 문제를 만든 사람: Arnav Sastry
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /