結果

問題 No.2112 All 2x2 are Equal
ユーザー 👑 rin204rin204
提出日時 2022-10-28 21:44:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 523 bytes
コンパイル時間 1,844 ms
コンパイル使用メモリ 85,848 KB
実行使用メモリ 86,284 KB
最終ジャッジ日時 2023-09-20 04:38:00
合計ジャッジ時間 12,367 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
71,208 KB
testcase_01 WA -
testcase_02 AC 109 ms
77,400 KB
testcase_03 AC 109 ms
76,728 KB
testcase_04 AC 160 ms
80,792 KB
testcase_05 AC 176 ms
81,680 KB
testcase_06 WA -
testcase_07 AC 144 ms
79,492 KB
testcase_08 AC 209 ms
83,576 KB
testcase_09 AC 110 ms
77,516 KB
testcase_10 AC 146 ms
80,188 KB
testcase_11 AC 131 ms
79,244 KB
testcase_12 AC 146 ms
79,584 KB
testcase_13 WA -
testcase_14 AC 116 ms
77,456 KB
testcase_15 AC 186 ms
82,284 KB
testcase_16 AC 86 ms
76,464 KB
testcase_17 AC 199 ms
83,812 KB
testcase_18 WA -
testcase_19 AC 112 ms
77,788 KB
testcase_20 AC 120 ms
77,544 KB
testcase_21 AC 204 ms
83,212 KB
testcase_22 AC 135 ms
77,464 KB
testcase_23 WA -
testcase_24 AC 127 ms
77,884 KB
testcase_25 AC 126 ms
78,248 KB
testcase_26 WA -
testcase_27 AC 135 ms
78,676 KB
testcase_28 AC 173 ms
81,132 KB
testcase_29 AC 131 ms
78,356 KB
testcase_30 AC 170 ms
79,652 KB
testcase_31 AC 191 ms
82,064 KB
testcase_32 WA -
testcase_33 AC 250 ms
86,080 KB
testcase_34 AC 245 ms
86,172 KB
testcase_35 AC 258 ms
86,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h, w = map(int, input().split())

A = [[0] * w for _ in range(h)]
for i in range(h):
    for j in range(w):
        if j & 1:
            ii = h - 1 - i
        else:
            ii = i
        if i & 1:
            jj = w - 1 - j
        else:
            jj = j

        x = ii * w + jj + 1
        A[i][j] = x
        x += 1

print("Yes")
for row in A:
    print(*row)

se = set()
for i in range(h - 1):
    for j in range(w - 1):
        se.add(A[i][j] + A[i + 1][j] + A[i][j + 1] + A[i + 1][j + 1])
assert len(se) == 1
0