結果

問題 No.2090 否定論理積と充足可能性
ユーザー だれだれ
提出日時 2022-09-30 21:31:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 442 bytes
コンパイル時間 595 ms
コンパイル使用メモリ 10,880 KB
実行使用メモリ 8,240 KB
最終ジャッジ日時 2023-08-24 14:50:13
合計ジャッジ時間 1,752 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,180 KB
testcase_01 AC 15 ms
8,080 KB
testcase_02 AC 16 ms
8,092 KB
testcase_03 AC 16 ms
8,056 KB
testcase_04 WA -
testcase_05 AC 15 ms
8,144 KB
testcase_06 AC 15 ms
8,240 KB
testcase_07 AC 16 ms
8,096 KB
testcase_08 AC 15 ms
8,024 KB
testcase_09 AC 15 ms
8,160 KB
testcase_10 RE -
testcase_11 AC 15 ms
8,176 KB
testcase_12 AC 15 ms
8,048 KB
testcase_13 AC 15 ms
8,052 KB
testcase_14 AC 15 ms
8,184 KB
testcase_15 AC 16 ms
8,096 KB
testcase_16 AC 16 ms
8,216 KB
testcase_17 RE -
testcase_18 WA -
testcase_19 AC 16 ms
8,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def u(v):
    a, b, c, d, e, f = v
    return not(not(not(not(a | b) | c) | d) | e) | f

l = list(map(int, input().split()))
for i in range(1 << 6):
    v = [0] * 6
    for j in range(6):
        if i >> j & 1:
            v[j] = 1
    f = 1
    for j in range(6):
        for k in range(6):
            if l[i] == l[j] and v[i] != v[j]:
                f = 0
    if f:
        if u(v):
            print("YES")
            exit()
print("NO")
0