当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2530:Tetris Alphabet

题目描述
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.
输入样例
6
...........XX.......
..........MMMM......
..........K.........
........KKK.........
.....ZAAA.FFF.......
.....ZZZA..F.B......
输出样例
BFZAKMX

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-2530

最后修改于 2020-10-29T06:35:06+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000 65536