CF1850C.Word on the Paper

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

On an 8×88 \times 8 grid of dots, a word consisting of lowercase Latin letters is written vertically in one column, from top to bottom. What is it?

在一个 8×88 \times 8 的点阵上,一个由小写拉丁字母组成的单词垂直写在某一列中,从上到下。这个单词是什么?

输入格式

The input consists of multiple test cases. The first line of the input contains a single integer tt (1≤t≤10001 \leq t \leq 1000) — the number of test cases.

Each test case consists of 88 lines, each containing 88 characters. Each character in the grid is either .\texttt{.} (representing a dot) or a lowercase Latin letter (a\texttt{a}–z\texttt{z}).

The word lies entirely in a single column and is continuous from the beginning to the ending (without gaps). See the sample input for better understanding.

输入包含多个测试用例。输入的第一行是一个整数 tt(1≤t≤10001 \leq t \leq 1000),表示测试用例的数量。

每个测试用例由 88 行组成,每行包含 88 个字符。网格中的每个字符要么是 .\texttt{.}(表示一个点),要么是一个小写拉丁字母(a\texttt{a}–z\texttt{z})。

该单词完全位于某一列中,且从起始到结束连续排列(中间无空隙)。参见样例输入以加深理解。

输出格式

For each test case, output a single line containing the word made up of lowercase Latin letters (a\texttt{a}–z\texttt{z}) that is written vertically in one column from top to bottom.

对于每个测试用例,输出一行,包含由小写拉丁字母(a\texttt{a}–z\texttt{z})组成的单词,该单词在单列中从上到下垂直书写。

输入输出样例

  • 输入#1

    5
    ........
    ........
    ........
    ........
    ...i....
    ........
    ........
    ........
    ........
    .l......
    .o......
    .s......
    .t......
    ........
    ........
    ........
    ........
    ........
    ........
    ........
    ......t.
    ......h.
    ......e.
    ........
    ........
    ........
    ........
    ........
    .......g
    .......a
    .......m
    .......e
    a.......
    a.......
    a.......
    a.......
    a.......
    a.......
    a.......
    a.......

    输出#1

    i
    lost
    the
    game
    aaaaaaaa

输入解题思路,AI测评打分。不知道怎么写?

首页