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

16664번 - Easy Chess 스페셜 저지다국어

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

문제

Elma is learning chess figures.

She learned that a rook can move either horizontally or vertically. To enhance her understanding of rook movement Elma’s grandmother gave Elma an 8 × 8 chess board and asked her to find a way to move the rook from a1 to h8 making exactly n moves, so that all visited cells are different.

A visited cell is the initial cell a1 and each cell on which the rook lands after a move.

입력

The input contains a single integer n (2 ≤ n ≤ 63) — the desired number of moves.

출력

Output a space-separated list of n+ 1 visited cells in the order they are visited by the rook. All cells must be different. The list should start with a1 and end with h8. A solution always exists.

제한

예제 입력 1

4

예제 출력 1

a1 f1 c1 c8 h8

힌트

출처

ICPC > Regionals > Northern Eurasia > Northern Eurasia Finals > NERC 2018 E번

  • 문제의 오타를 찾은 사람: wookje
(追記) (追記ここまで)

출처

대학교 대회

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

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