結果

問題 No.2112 All 2x2 are Equal
ユーザー ygd.ygd.
提出日時 2022-10-28 22:32:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,108 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 10,836 KB
実行使用メモリ 48,616 KB
最終ジャッジ日時 2023-09-20 05:38:49
合計ジャッジ時間 12,602 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
9,204 KB
testcase_01 AC 26 ms
9,228 KB
testcase_02 WA -
testcase_03 AC 39 ms
10,144 KB
testcase_04 WA -
testcase_05 AC 301 ms
29,928 KB
testcase_06 AC 515 ms
46,044 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 202 ms
22,776 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 455 ms
41,676 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 28 ms
9,204 KB
testcase_17 WA -
testcase_18 AC 36 ms
9,944 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 39 ms
10,100 KB
testcase_24 AC 69 ms
12,384 KB
testcase_25 AC 85 ms
13,628 KB
testcase_26 AC 69 ms
12,224 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 548 ms
48,472 KB
testcase_33 AC 546 ms
48,472 KB
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from re import A
import sys
#input = sys.stdin.readline
#input = sys.stdin.buffer.readline #文字列はダメ
#sys.setrecursionlimit(1000000)
#import math
import bisect
#import itertools
#import random
#from heapq import heapify, heappop, heappush
from collections import defaultdict
#from collections import deque
#import copy #DeepCopy: hoge = [_[:] for _ in hogehoge]
#from functools import lru_cache
#@lru_cache(maxsize=None)
#MOD = pow(10,9) + 7
MOD = 998244353
#dx = [1,0,-1,0]
#dy = [0,1,0,-1]
#dx8 = [1,1,0,-1,-1,-1,0,1]
#dy8 = [0,1,1,1,0,-1,-1,-1]

def main():
    H,W = map(int,input().split())

    A = [[0]*W for _ in range(H)]

    s = H*W+1
    num = 0
    for i in range(H//2):
        for j in range(W):
            num += 1
            if j%2 == 0:
                A[i*2][j] = num
                A[i*2+1][j] = s-num
            else:
                A[i*2][j] = s-num
                A[i*2+1][j] = num

    if H%2 == 1:
        for j in range(W):
            num += 1
            A[H-1][j] = num
    print('Yes')
    for ret in A:
        print(*ret)

if __name__ == '__main__':
    main()
0