結果

問題 No.2112 All 2x2 are Equal
ユーザー vltmttvltmtt
提出日時 2023-02-19 02:21:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 183 ms / 2,000 ms
コード長 314 bytes
コンパイル時間 687 ms
コンパイル使用メモリ 86,848 KB
実行使用メモリ 86,672 KB
最終ジャッジ日時 2023-09-27 13:16:51
合計ジャッジ時間 8,951 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,316 KB
testcase_01 AC 61 ms
71,364 KB
testcase_02 AC 76 ms
76,408 KB
testcase_03 AC 73 ms
76,244 KB
testcase_04 AC 117 ms
80,608 KB
testcase_05 AC 134 ms
81,776 KB
testcase_06 AC 170 ms
85,136 KB
testcase_07 AC 107 ms
79,764 KB
testcase_08 AC 149 ms
83,592 KB
testcase_09 AC 82 ms
77,484 KB
testcase_10 AC 118 ms
80,580 KB
testcase_11 AC 103 ms
79,356 KB
testcase_12 AC 112 ms
79,476 KB
testcase_13 AC 162 ms
84,304 KB
testcase_14 AC 80 ms
76,640 KB
testcase_15 AC 141 ms
82,244 KB
testcase_16 AC 74 ms
76,620 KB
testcase_17 AC 152 ms
83,588 KB
testcase_18 AC 77 ms
76,484 KB
testcase_19 AC 89 ms
77,668 KB
testcase_20 AC 85 ms
76,632 KB
testcase_21 AC 154 ms
83,464 KB
testcase_22 AC 79 ms
76,416 KB
testcase_23 AC 75 ms
76,632 KB
testcase_24 AC 89 ms
77,976 KB
testcase_25 AC 92 ms
78,076 KB
testcase_26 AC 87 ms
77,652 KB
testcase_27 AC 98 ms
78,620 KB
testcase_28 AC 124 ms
80,724 KB
testcase_29 AC 91 ms
77,744 KB
testcase_30 AC 108 ms
79,788 KB
testcase_31 AC 140 ms
82,008 KB
testcase_32 AC 183 ms
86,436 KB
testcase_33 AC 175 ms
86,672 KB
testcase_34 AC 173 ms
86,448 KB
testcase_35 AC 168 ms
86,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h,w = map(int,input().split())
ans =[[0 for i in range(w)] for j in range(h)]
c1 = 0
c2 = 0
for i in range(h):
    for j in range(w):
        if (i+j)%2 == 0:
            c1 += 1
            ans[i][j] = c1
        else:
            c2 += 1
            ans[i][j] = h*w+1-c2

print("Yes")
for a in ans:
    print(*a)
0