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

13776번 - Alpha Puzzle 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB16914111784.173%

문제

An alpha puzzle is a type of crossword puzzle where each letter square (ie one that is not black) contains a number to represent a letter. Throughout the puzzle, a particular letter is always represented by the same number. All letters of the alphabet are used, so numbers range from 1 to 26.

In this problem you will be given a solution to an alpha puzzle and have to assign numbers to the letters. Some alpha puzzles assign numbers to letters randomly, but the one that appears in the New Zealand Herald every day uses a non-random method which you have to implement.

The answer grid is read left to right, top to bottom; spaces (which represent black squares) are ignored. The first letter encountered is assigned the number 1, the next number 2 and so on. Only the first occurrence of a letter is processed, so only 26 numbers are allocated.

입력

You will be presented with a single puzzle solution which starts with a single integer, S, on a line by itself (10 <= S <=20). S is the size of the puzzle – the number of rows and columns of squares that it contains.

There will then follow S lines, each containing S characters, all upper case letters or spaces. Every letter of the alphabet will appear at least once.

출력

Follow the rules for letter allocation described above then output the 26 letters of the alphabet in their assigned numerical order so that, for example, the first letter is the one to which the number 1 is assigned, the last the one to which 26 was assigned.

제한

예제 입력 1

13
CITADEL POPPY
H O O U A L I
ARROW MASSAGE
S S N B S C L
SHOULDER BARD
I O R T T
SQUEAL FRIEZE
 N D A O X
FILE CLAPTRAP
E U J T I A L
VACCINE CARGO
E K V R A E D
RHYME SPLURGE

예제 출력 1

CITADELPOYHURWMSGNBQFZXJVK

힌트

출처

ICPC > Regionals > South Pacific > South Pacific Region > New Zealand Programming Contest > NZPC 2016 F번

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

출처

대학교 대회

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

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