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

26498번 - Snowflakes 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB89666575.581%

문제

Snowflakes can be symmetrical both vertically and horizontally. Snowflakes that aren’t symmetrical are useless. A snowflake is essentially a two dimensional array of features. A feature is a single digit between 0 and 9. Horizontal symmetry occurs if you flip the snowflake horizontally. It is still the same snowflake. Likewise, vertical symmetry is defined in the same way. A snowflake is “Beautiful” if its horizontally symmetrical, “Graceful” if its vertically symmetrical, and “Magnificent” if it is both. Otherwise it is “Useless”. For each snowflake, print what kind of snowflake it is.

입력

The first line of data contains n, the number of inputs. Each input starts with a single integer k, k ≤ 20, denoting the dimension of the square snowflake. Then k lines follow with each line containing a string of length k denoting the digits in the snowflake.

출력

For each input. print the type of snowflake.

제한

예제 입력 1

3
3
123
321
143
2
11
11
3
121
232
343

예제 출력 1

Useless
Magnificent
Graceful

힌트

출처

School > PLU High School Programming Contest > PLU 2012 > Advanced 10번

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

출처

대학교 대회

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

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