結果

問題 No.1851 Regular Tiling
コンテスト
ユーザー H20
提出日時 2022-02-25 22:55:48
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 413 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 356 ms
コンパイル使用メモリ 85,248 KB
実行使用メモリ 83,072 KB
最終ジャッジ日時 2026-03-25 01:39:02
合計ジャッジ時間 2,298 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

BIGMAP = []
for _ in range(50):
    BIGMAP.append([0,1,1]*100)
    BIGMAP.append([1,2,2]*100)
    BIGMAP.append([1,2,2]*100)

T = int(input())
for _ in range(T):
    H,W = map(int, input().split())
    hoff = 0
    woff = 0
    if H%3==2:
        hoff+=1
    if W%3==2:
        woff+=1
    MAP = []
    for i in range(hoff,H+hoff):
        MAP.append(BIGMAP[i][woff:W+woff])
    for m in MAP:
        print(*m)


0