結果

問題 No.2090 否定論理積と充足可能性
ユーザー googol_S0googol_S0
提出日時 2022-09-30 21:25:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 323 bytes
コンパイル時間 403 ms
コンパイル使用メモリ 86,112 KB
実行使用メモリ 70,908 KB
最終ジャッジ日時 2023-08-24 14:36:12
合計ジャッジ時間 2,736 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
70,472 KB
testcase_01 AC 71 ms
70,756 KB
testcase_02 AC 73 ms
70,908 KB
testcase_03 AC 73 ms
70,600 KB
testcase_04 AC 71 ms
70,888 KB
testcase_05 AC 73 ms
70,772 KB
testcase_06 AC 71 ms
70,480 KB
testcase_07 AC 71 ms
70,492 KB
testcase_08 AC 72 ms
70,808 KB
testcase_09 AC 70 ms
70,612 KB
testcase_10 AC 72 ms
70,724 KB
testcase_11 AC 72 ms
70,656 KB
testcase_12 AC 70 ms
70,848 KB
testcase_13 AC 72 ms
70,612 KB
testcase_14 AC 72 ms
70,584 KB
testcase_15 AC 70 ms
70,612 KB
testcase_16 AC 70 ms
70,848 KB
testcase_17 AC 73 ms
70,568 KB
testcase_18 AC 71 ms
70,692 KB
testcase_19 AC 72 ms
70,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A=list(map(int,input().split()))
S=sorted(set(A))
D=dict()
for i in range(len(S)):
  D[S[i]]=i
for i in range(6):
  A[i]=D[A[i]]
def f(x,y):
  return 1^(x&y)

for i in range(1<<6):
  x=[(i>>j)&1 for j in range(6)]
  if f(f(f(x[A[0]],x[A[1]]),x[A[2]]),f(f(x[A[3]],x[A[4]]),x[A[5]])):
    print('YES')
    exit()
print('NO')
0