結果
| 問題 |
No.1851 Regular Tiling
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-25 21:34:29 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 670 ms / 2,000 ms |
| コード長 | 512 bytes |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2024-07-03 16:17:17 |
| 合計ジャッジ時間 | 4,763 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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()