結果
| 問題 |
No.2090 否定論理積と充足可能性
|
| コンテスト | |
| ユーザー |
miscalc
|
| 提出日時 | 2022-09-30 21:51:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 467 bytes |
| コンパイル時間 | 274 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-12-22 23:20:26 |
| 合計ジャッジ時間 | 1,887 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 4 |
ソースコード
import sys
a = list(map(int, input().split()))
n = len(a)
def nand(x, y):
return 1 if x == 0 and y == 0 else 0
for b in range(1 << n):
c = [1 if (b & (1 << i)) else 0 for i in range(n)]
ok = True
for i in range(n):
for j in range(i + 1, n):
if c[i] != c[j] and a[i] == a[j]:
ok = False
break
if not ok:
continue
if nand(nand(nand(c[0], c[1]), c[2]), nand(nand(c[3], c[4]), c[5])):
print("YES")
sys.exit()
print("NO")
miscalc