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

21592번 - Longest Common Substring 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB27213010248.571%

문제

Given a list of strings, what is the longest substring common to all of them?

입력

The first line of input contains an integer $n$ (1ドル \le n \le 1,000$), which is the number of strings that follow.

Each of the next $n$ lines contains a single string $s$ (1ドル \le |s| \le 100$) consisting only of lower-case letters.

출력

Output a single integer, which is the length of the longest substring common to all of the input strings.

제한

예제 입력 1

5
axabcrwmvd
abcn
tabchwqsl
bvrkabcayna
tyabc

예제 출력 1

3

힌트

출처

ICPC > Regionals > North America > North America Division Championships > 2021 ICPC North America Division Championships H번

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

출처

대학교 대회

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

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