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

8053번 - Repetitions 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 128 MB90332837.838%

문제

A sequence of words over alphabet [‘a’,…,’z’] is given. The length of longest word occuring as a coherent fragment in every word given is to be found.

Write a program which:

  • reads the sequence of words from the standard input,
  • counts the length of the longest word occuring as a coherent fragment in every word given,
  • writes the result to the standard output.

입력

In the first line of the standard input there is an integer n, where 1 ≤ n ≤ 5 is the number of words. In each of the next n lines there is one word formed from small letters of English alphabet [‘a’,…,’z’]. The length of each word is at least 1, but not greater than 2,000.

출력

The text of standard output should consist of exactly one line containing a single integer equal to the length of the longest word occuring as the coherent fragment in every word given.

제한

예제 입력 1

3
abcb
bca
acbc

예제 출력 1

2

힌트

출처

Olympiad > Polish Olympiad in Informatics > POI 1999/2000 > Stage 3 4번

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

출처

대학교 대회

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

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