結果
| 問題 |
No.2024 Xer
|
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2022-07-29 23:39:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 348 bytes |
| コンパイル時間 | 150 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 147,880 KB |
| 最終ジャッジ日時 | 2024-07-19 17:15:31 |
| 合計ジャッジ時間 | 20,451 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 45 WA * 2 |
ソースコード
import sys
input = sys.stdin.readline
N,X=map(int,input().split())
A=list(map(int,input().split()))
from functools import cmp_to_key
def cmp(a,b):
return -1 if min(a,a^X)<min(b,b^X) else 1
As = sorted(A, key=cmp_to_key(cmp))
ng=0
for i in range(1,N):
if As[i-1]^X >= As[i]:
ng=1
print("Yes" if ng==0 and len(set(A))==N else "No")
ikoma