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

2274번 - Conflicting Strings 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB3811933.333%

문제

In 2417 archaeologists discovered a large collection of 20th century text documents of vital historical importance. Although there were many duplicated documents it was soon evident that, as well as the damage due to time making much of the text illegible, there were also some disagreements between them. However, it was noticed that groups of texts could be made consistent, i.e. consistency between texts could be achieved by leaving out some (small) number of texts. For example, the texts:

ap***
ab*le
app*e
*p**e

(where * denotes an illegible character) can be made consistent by removing just the second text.

입력

Input will consist of a sequence of sets of texts. Each set will begin with a line specifying the number of texts in the set, and the maximum number of texts which can be removed. This will be followed by the individual texts, one per line. Each text consists of at least one and no more than 250 characters, either lower case letters or asterisks. All the texts in a set will be the same length and there will be no more than 10,000 texts in a set. The sequence of sets is terminated by a line containing two zeros (0 0).

출력

Output for each set consists of a line containing one of the words ‘Yes’ or ‘No’ depending on whether or not the set can be made consistent by removing at most the specified number of texts.

제한

예제 입력 1

4 1
ap***
ab*le
app*e
*pple
3 1
a
b
c
4 2
fred
ferd
derf
frd*
0 0

예제 출력 1

Yes
No
No

힌트

출처

ICPC > Regionals > South Pacific > South Pacific Region > New Zealand Programming Contest > NZPC 2005 M번

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

출처

대학교 대회

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

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