| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 121 | 116 | 109 | 95.614% |
A snakey string is a fancy rendering of an otherwise normal string of text. When a string is made snakey, it is placed on a 2D grid such that the following conditions are met:
Figure 1: The snakey string in the sample case.
Given a snakey string, can you recover the original string?
The first line of input contains two integers $r$ and $c$ ($2 \le r, c \le 100$), the number of rows and columns of the grid.
The next $r$ lines each contain $c$ characters that form the 2D grid containing the snakey string. Empty cells are encoded with a period, while uppercase letters (A-Z) represent characters in the original string. Every column in the grid contains exactly one uppercase letter. It is possible that some rows do not contain any uppercase letters.
Output a single string, the original string that was used to build this snakey string.
4 8 ..G..... .I.S.U.. B...O.T. .......H
BIGSOUTH
ICPC > Regionals > North America > Southeast USA Regional > 2025 Southeast USA Regional Programming Contest > Division 2 A번
ICPC > Regionals > North America > South Central USA Regional > 2025 South Central USA Regional Contest > Division 2 A번
ICPC > Regionals > North America > Mid-Atlantic Regional > 2025 Mid-Atlantic USA Regional Contest > Division 2 A번