結果
| 問題 |
No.2024 Xer
|
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2022-07-29 23:41:20 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 1,394 ms / 2,000 ms |
| コード長 | 371 bytes |
| コンパイル時間 | 333 ms |
| コンパイル使用メモリ | 82,268 KB |
| 実行使用メモリ | 148,204 KB |
| 最終ジャッジ日時 | 2024-07-19 17:17:40 |
| 合計ジャッジ時間 | 22,814 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 47 |
ソースコード
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] or As[i-1] >= As[i]^X:
ng=1
print("Yes" if ng==0 and len(set(A))==N else "No")
ikoma