結果
| 問題 | No.1851 Regular Tiling |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-25 21:34:29 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
AC
|
| 実行時間 | 457 ms / 2,000 ms |
| コード長 | 512 bytes |
| 記録 | |
| コンパイル時間 | 488 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 15,484 KB |
| 最終ジャッジ日時 | 2026-03-25 00:12:51 |
| 合計ジャッジ時間 | 4,538 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 14 |
ソースコード
def main():
T = int(input())
for i in range(T):
h, w = map(int, input().split())
def sub(x):
if x % 3 == 2:
return [1, 1, 0]*(x//3) + [1, 1]
if x % 3 == 1:
return [0] + [1, 1, 0]*(x//3)
if x % 3 == 0:
return [1, 1, 0]*(x//3)
a = sub(h)
b = sub(w)
for i in a:
for j in b:
print(i+j, end=' ')
print()
if __name__ == '__main__':
main()