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

7858번 - Tetris Alphabet 다국어

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

문제

The game of Tetris is played with four-connected blocks falling down the well having N rows and 20 columns. Each figure is marked with a unique English letter from ‘A’ to ‘Z’.

Your program must, given the state of the well, determine the order in which the blocks fell down.

입력

The first line of input file contains integer N (1 ≤ N ≤ 50) — number of rows. Following N lines contain 20 characters each, with characters that are either a letter from ‘A’ to ‘Z’ or the dot character (ASCII 46), representing an empty cell.

출력

Output file must contain a string of letters indicating the order in which figures fell down. If there is more than one order, lexicographically smallest one must be printed. Input data will guarantee that at least one nonempty order exists.

제한

예제 입력 1

6
...........XX.......
..........MMMM......
..........K.........
........KKK.........
.....ZAAA.FFF.......
.....ZZZA..F.B......

예제 출력 1

BFZAKMX

힌트

출처

ICPC > Regionals > Northern Eurasia > Far Eastern Russia Regional Contest > NEERC Far-Eastern Subregional 2002 A번

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

출처

대학교 대회

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

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