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

24700번 - Permutation Matrix 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB110615159.302%

문제

You are given a positive integer $n$. Construct such matrix 2ドル^n \times 2^n$ that:

  • The matrix contains distinct positive integers from 1ドル$ to 2ドル^{2n}$.
  • The sums of elements all each submatrices of size 2ドル^{n-1} \times 2^{n-1}$ are equal.

A submatrix is a contiguous rectangle of elements in the original matrix.

입력

The first line contains an integer $n$ (1ドル \le n \le 10$).

출력

On the very first line, print "YES" if the answer exists, or "NO" if not.

If the answer exists, print any such matrix on the next 2ドル^n$ lines, with each line containing 2ドル^n$ space-separated integers.

제한

예제 입력 1

1

예제 출력 1

NO

힌트

출처

Camp > Petrozavodsk Programming Camp > Winter 2022 > Day 5: Yandex Cup E번

Contest > Open Cup > 2021/2022 Season > Stage 12: Grand Prix of Grushevka E번

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

출처

대학교 대회

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

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