RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
COCI00413

Tavan

Unrated 레이팅 미적용
난이도
1s
시간 제한
32MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

1 \(s / 32\) \(MB / 80\) points

Little Željko has been reading his grandma’s old letters in the attic and has come across a

word of length \(N\)

. Unfortunately, he couldn’t make out what it said because of the spilled ink.

He rewrote the word on a piece of paper by replacing each of the \(M\) illegible letters with the

character ‘#’. He handed the piece of paper to his grandma and she gave him \(K\) different

candidates for each of the illegible letters. After that, Željko wrote all the possible words in a

notebook and decided to closely look at their properties in order to determine what the

original words was. After seeing the words written down in the notebook, his grandma

realized that the word they’re looking for is the \(X\)

^{th} one in alphabetical order. Željko had the

sniffles the day they learned the alphabet in school, so he’s asking you for your help with

determining the original word.

제약

In test cases worth 30% of total points, it will hold \(M\)

= 1 and \(K\)

= 3.
In test cases worth an additional 30% of points, it will hold \(M\)

= 1.

입력 형식

The first line of input contains the integers \(N\)

, \(M\)

, \(K\) and \(X\) (1 ≤ \(N \le 500\), 1 ≤ \(M\)\(N\)

, 1 ≤ \(K \le 26\),

1 ≤ \(X\)

≤ 10 {9}{ }).
The second line of input contains the word of length \(N\) that Željko wrote on a piece of paper,

consisting of lowercase letters of the English alphabet and the character ‘#’.
Each of the following \(M\) lines contains one word of length \(K\)

, the \(i\)

\(th\) of these words consisting

of letters that could replace the \(i\)

\(th\)

illegible letter.

Number \(X\) will always be less than or equal to the total number of words that can be

constructed.

출력 형식

The first line of output must contain the \(X\)

\(th\)

word in alphabetical order.

예제 1
입력
9 2 3 7
po#olje#i
sol
znu

4 1 2 2
#rak
zm
출력
output
posoljeni
zrak


1 s / 32 MB / 80 points
설명

Clarification of the first test case:
The possible words, in aphabetical order, are: “pololjeni”, “pololjeui”, “pololjezi”, “poooljeni”, “poooljeui”,

“poooljezi”, “posoljeni”, “posoljeui”, “posoljezi”.

문제 정보

생성자가 기록되지 않았습니다.

출처 COCI 2016/2017 Contest 2

평가 및 의견

Tavan

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Tavan

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8