結果
| 問題 | No.2024 Xer |
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2022-07-29 23:41:20 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 905 ms / 2,000 ms |
| + 956µs | |
| コード長 | 371 bytes |
| 記録 | |
| コンパイル時間 | 103 ms |
| コンパイル使用メモリ | 65,076 KB |
| 実行使用メモリ | 111,556 KB |
| 最終ジャッジ日時 | 2026-10-17 11:39:50 |
| 合計ジャッジ時間 | 18,504 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 48 |
ソースコード
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