結果

問題 No.2090 否定論理積と充足可能性
ユーザー だれだれ
提出日時 2022-09-30 21:40:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 505 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 10,864 KB
実行使用メモリ 8,272 KB
最終ジャッジ日時 2023-08-24 15:04:44
合計ジャッジ時間 1,327 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,144 KB
testcase_01 AC 15 ms
8,112 KB
testcase_02 AC 16 ms
8,248 KB
testcase_03 AC 15 ms
8,260 KB
testcase_04 AC 16 ms
7,820 KB
testcase_05 AC 15 ms
8,128 KB
testcase_06 AC 15 ms
8,268 KB
testcase_07 AC 15 ms
8,124 KB
testcase_08 AC 15 ms
8,164 KB
testcase_09 AC 15 ms
8,200 KB
testcase_10 AC 16 ms
7,936 KB
testcase_11 AC 16 ms
8,272 KB
testcase_12 AC 15 ms
8,248 KB
testcase_13 AC 15 ms
8,184 KB
testcase_14 AC 15 ms
8,112 KB
testcase_15 AC 15 ms
8,272 KB
testcase_16 AC 15 ms
8,172 KB
testcase_17 AC 16 ms
7,844 KB
testcase_18 AC 15 ms
7,964 KB
testcase_19 AC 16 ms
8,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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