結果
| 問題 |
No.2819 Binary Binary-Operator
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-27 12:07:45 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 612 bytes |
| コンパイル時間 | 455 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 69,600 KB |
| 平均クエリ数 | 1.00 |
| 最終ジャッジ日時 | 2024-07-27 12:07:53 |
| 合計ジャッジ時間 | 8,097 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 64 |
ソースコード
import itertools
lst = [0, 1]
pattern = list(itertools.product([0,1], repeat=4))
# print(pattern)
x, y = map(int, input().split())
xy = x*2 + y
# K = 4
K = 3
vs = list(itertools.product([0,1], repeat=K)) # 処理列の候補
for v in vs:
ok = True
for p in pattern:
ans01 = p[xy]
now = v[0]
for i in range(K-1):
nxt = v[i+1]
now = p[now*2 + nxt]
if now != ans01:
ok = False
break
if ok == True:
print(K)
ans = list(v)
print(*ans)
res = int(input())
print(res)
exit()