結果
| 問題 |
No.2024 Xer
|
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2022-07-29 23:38:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 383 bytes |
| コンパイル時間 | 271 ms |
| コンパイル使用メモリ | 82,236 KB |
| 実行使用メモリ | 147,684 KB |
| 最終ジャッジ日時 | 2024-07-19 17:13:36 |
| 合計ジャッジ時間 | 20,343 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 24 WA * 23 |
ソースコード
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(i,As[i-1]^X , As[i])
print("Yes" if ng==0 and len(set(A))==N else "No")
ikoma