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

16415번 - Repeated Substrings 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB183958752.727%

문제

Given an input string composed solely of lowercase English letters, find the longest substring that occurs more than once in the input string. The two occurrences are allowed to partially overlap.

입력

The input is a single line containing a string of lowercase letters. The string contains more than one character, but no more than 105. At least one letter will appear at least twice.

출력

Print a single line of output: the longest substring that occurs more than once in the input string. If there are multiple longest repeated substrings, print the one the would come first when the longest substrings are sorted in lexicographical (alphabetical) order.

제한

예제 입력 1

abcefgabc

예제 출력 1

abc

예제 입력 2

abcbabcba

예제 출력 2

abcba

예제 입력 3

aaaa

예제 출력 3

aaa

예제 입력 4

bbcaadbbeaa

예제 출력 4

aa

힌트

출처

ICPC > Regionals > North America > Mid-Central Regional > 2018 Mid-Central Regional Programming Contest K번

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

출처

대학교 대회

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

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