結果
問題 | No.2090 否定論理積と充足可能性 |
ユーザー |
|
提出日時 | 2022-09-30 21:39:53 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 52 ms / 2,000 ms |
コード長 | 620 bytes |
コンパイル時間 | 275 ms |
コンパイル使用メモリ | 81,896 KB |
実行使用メモリ | 57,388 KB |
最終ジャッジ日時 | 2024-12-22 22:46:08 |
合計ジャッジ時間 | 1,977 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
from collections import *from itertools import *from functools import *from heapq import *import sys,mathinput = sys.stdin.readlineA = 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]*Xfor j in range(X):if (i>>j)&1:tmp[j]=1if ~((~((~(tmp[A[0]]&tmp[A[1]]))&(tmp[A[2]])))&(~((~(tmp[A[3]]&tmp[A[4]]))&(tmp[A[5]])))):print('YES')exit()print('NO')