結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,236 KB
testcase_01 AC 16 ms
8,052 KB
testcase_02 AC 16 ms
8,108 KB
testcase_03 AC 16 ms
8,088 KB
testcase_04 WA -
testcase_05 AC 15 ms
8,056 KB
testcase_06 AC 15 ms
8,140 KB
testcase_07 AC 15 ms
8,132 KB
testcase_08 AC 16 ms
8,200 KB
testcase_09 AC 16 ms
8,192 KB
testcase_10 WA -
testcase_11 AC 16 ms
8,240 KB
testcase_12 AC 16 ms
8,184 KB
testcase_13 AC 15 ms
8,204 KB
testcase_14 AC 16 ms
8,244 KB
testcase_15 AC 16 ms
8,124 KB
testcase_16 AC 16 ms
8,120 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 16 ms
8,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def u(v):
    a, b, c, d, e, f = v
    return not(not(not(not(a and b) and c) and d) and e) and 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[j] == l[k] and v[j] != v[k]:
                f = 0
    if f:
        if u(v):
            print("YES")
            exit()
print("NO")
0