結果
問題 |
No.2819 Binary Binary-Operator
|
ユーザー |
|
提出日時 | 2024-11-10 11:05:40 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 426 bytes |
コンパイル時間 | 504 ms |
コンパイル使用メモリ | 81,876 KB |
実行使用メモリ | 70,964 KB |
平均クエリ数 | 3.00 |
最終ジャッジ日時 | 2024-11-10 11:05:49 |
合計ジャッジ時間 | 7,732 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 40 WA * 24 |
ソースコード
from itertools import product x,y = map(int,input().split()) N = 20 ans = 0 for v in product((0,1),repeat=N): C = {0:set(),1:set()} for f in product((0,1),repeat=4): a = v[0] for i in range(1,N): b = v[i] a = f[a*2+b] C[a].add(f[2*x+y]) if len(C[0])==len(C[1]): ans = v[:] C1 = C break print(N) print(*ans) t = int(input()) print(C1[t].pop())