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

Kartomat

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

의견: 0

설명

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

A ticket machine is a device similar to an ATM and was introduced by Croatian Railways in
order to make purchasing train tickets easier. The first step in buying a ticket is choosing
the destination of your journey. The destination can be one of \(N\)

destinations offered in
advance, names of local and worldwide places. You choose your destination by typing its
name letter by letter. By entering each additional letter, the number of possible destinations
reduces.

The initial appearance of the keyboard on the screen is shown in the picture. We will
represent it as four arrays of characters of length 8.

ABCDE
FGHIJKLM
NOPQRSTU
VWXYZ

After choosing each letter, the keyboard changes its appearance. Only letters that can be
chosen in the next step are left active (depending on the destinations still possible to
choose). The remaining letter that can’t be chosen are replaced with the character “*”.

Write a programme that will, for \(N\)

given destinations and the first few letters (not all of them)
of the chosen destination, output the appearance of the keyboard before entering the next
letter. You will never be given the entire word.

제약
입력 형식

The first line contains the integer \(N\)

(1 ≤ \(N\)

≤ 50) from the task. Each of the following \(N\)

lines
contains one string of at most 100 characters that contains only uppercase letters of the
English alphabet. The last line contains the string that represents the first few letters of the
chosen destination.

출력 형식

You must output the appearance of the keyboard described in the task.

예제 1
입력
4
ZAGREB
SISAK
ZADAR
ZABOK
4
SPLIT
VINKOVCI
NOVSKA
RIJEKA
4
AAAABCD
AAAABCA
AAAACDE
AAAAAAA


1 s / 32 MB / 80 points

ZA

VINKO

AAAA
출력
output
output
****B*D*
*G******
********
********

********
********
********
V*******

***ABC**
********
********
********
설명

Clarification of the first test case:
After entering the letters “ZA”, the third letter can be “G” if we want a ticket to Zagreb, “D” if we want a
ticket to Zadar, and “B” if we want a ticket to Zabok.

문제 정보

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

출처 COCI 2016/2017 Contest 4

평가 및 의견

Kartomat

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

Log in to rate problems.

개별 의견

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

풀이 제출

Kartomat

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