結果

問題 No.2112 All 2x2 are Equal
ユーザー tassei903tassei903
提出日時 2022-11-15 00:19:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 237 ms / 2,000 ms
コード長 820 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 102,472 KB
最終ジャッジ日時 2023-10-14 07:17:57
合計ジャッジ時間 12,717 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,388 KB
testcase_01 AC 66 ms
71,452 KB
testcase_02 AC 91 ms
77,952 KB
testcase_03 AC 84 ms
76,512 KB
testcase_04 AC 153 ms
87,300 KB
testcase_05 AC 169 ms
90,404 KB
testcase_06 AC 216 ms
100,180 KB
testcase_07 AC 132 ms
84,724 KB
testcase_08 AC 200 ms
96,012 KB
testcase_09 AC 95 ms
78,160 KB
testcase_10 AC 142 ms
86,024 KB
testcase_11 AC 124 ms
83,544 KB
testcase_12 AC 138 ms
84,064 KB
testcase_13 AC 207 ms
97,804 KB
testcase_14 AC 92 ms
78,208 KB
testcase_15 AC 179 ms
92,208 KB
testcase_16 AC 87 ms
76,880 KB
testcase_17 AC 202 ms
95,592 KB
testcase_18 AC 91 ms
76,656 KB
testcase_19 AC 102 ms
79,080 KB
testcase_20 AC 99 ms
78,152 KB
testcase_21 AC 199 ms
94,880 KB
testcase_22 AC 93 ms
78,360 KB
testcase_23 AC 87 ms
76,892 KB
testcase_24 AC 107 ms
79,588 KB
testcase_25 AC 110 ms
80,368 KB
testcase_26 AC 103 ms
79,332 KB
testcase_27 AC 116 ms
82,172 KB
testcase_28 AC 160 ms
88,252 KB
testcase_29 AC 110 ms
79,548 KB
testcase_30 AC 136 ms
84,796 KB
testcase_31 AC 174 ms
91,672 KB
testcase_32 AC 230 ms
102,396 KB
testcase_33 AC 233 ms
102,472 KB
testcase_34 AC 237 ms
102,440 KB
testcase_35 AC 233 ms
102,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
h,w = na()

a = [[i * w + j+1 for j in range(w)]for i in range(h)]

b = [[0 for j in range(w)]for i in range(h)]
for i in range(h):
    for j in range(w):
        if i%2:
            b[i][j] = a[i][-1-j]
        else:
            b[i][j] = a[i][j]

b, a = [[0 for j in range(w)]for i in range(h)], b
for i in range(h):
    for j in range(w):
        if j%2:
            b[i][j] = a[-1-i][j]
        else:
            b[i][j] = a[i][j]
Yes()
for i in b:
    print(*i)
0