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

25850번 - A Game Called Mind 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB24721619186.425%

문제

This problem deals with a simplified version of a game called “Mind”. In this game, a group tries to cooperatively solve a problem. Assume:

  • There are 2-6 players (called A, B, C, D, E, F).
  • Each player has 1-9 cards in sorted order.
  • Each card value is between 10 and 99 (inclusive).
  • There are no duplicate values, i.e., a card (number) is in at most one hand

The objective of the game is for all the players to put all the cards down in sorted order (in the real game, players do not see their own cards, hence the name for the game – Mind). Given the cards in each hand, you are to provide the order for the players to place their cards down.

입력

The first input line contains an integer, p (2 ≤ p ≤ 6), indicating the number of players. Each of the following p input lines provides the cards for one player. Each line starts with an integer, c (1 ≤ c ≤ 9), indicating the number of cards for that player; the count is followed by the cards in sorted order (each card between 10 and 99, inclusive).

출력

Print the order for the players to place down the cards so that the cards are in order.

제한

예제 입력 1

2
3 10 40 50
2 20 30

예제 출력 1

ABBAA

예제 입력 2

3
4 40 51 60 70
3 12 32 42
5 20 53 80 90 95

예제 출력 2

BCBABACAACCC

힌트

출처

University > University of Central Florida > 2020 Local Programming Contest (Round 1A) 2번

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

출처

대학교 대회

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

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