結果

問題 No.2090 否定論理積と充足可能性
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2022-09-30 21:39:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 620 bytes
コンパイル時間 530 ms
コンパイル使用メモリ 86,728 KB
実行使用メモリ 73,144 KB
最終ジャッジ日時 2023-08-24 15:02:55
合計ジャッジ時間 3,594 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
72,680 KB
testcase_01 AC 106 ms
72,836 KB
testcase_02 AC 106 ms
72,696 KB
testcase_03 AC 104 ms
72,760 KB
testcase_04 AC 105 ms
72,800 KB
testcase_05 AC 105 ms
72,688 KB
testcase_06 AC 105 ms
73,144 KB
testcase_07 AC 105 ms
72,876 KB
testcase_08 AC 106 ms
72,784 KB
testcase_09 AC 105 ms
72,928 KB
testcase_10 AC 106 ms
72,708 KB
testcase_11 AC 106 ms
72,720 KB
testcase_12 AC 105 ms
73,008 KB
testcase_13 AC 106 ms
72,696 KB
testcase_14 AC 107 ms
72,824 KB
testcase_15 AC 107 ms
72,912 KB
testcase_16 AC 106 ms
72,756 KB
testcase_17 AC 104 ms
72,980 KB
testcase_18 AC 106 ms
72,848 KB
testcase_19 AC 104 ms
72,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline

A = list(map(int,input().split()))
def zip_coordinate(x):
    
    #1,2,3,~
    tx = list(set(x))
    tx.sort()
    d = {tx[i]:i for i in range(len(tx))}
    return [d[i] for i in x]
A = zip_coordinate(A)

X = len(set(A))
for i in range(1<<X):
    
    tmp = [0]*X
    for j in range(X):
        if (i>>j)&1:
            tmp[j]=1
    
    if ~((~((~(tmp[A[0]]&tmp[A[1]]))&(tmp[A[2]])))&(~((~(tmp[A[3]]&tmp[A[4]]))&(tmp[A[5]])))):
        print('YES')
        exit()
print('NO')
    
0