結果

問題 No.2024 Xer
コンテスト
ユーザー 👑 Kazun
提出日時 2022-07-29 23:37:28
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 247 ms / 2,000 ms
+ 82µs
コード長 329 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 233 ms
コンパイル使用メモリ 95,772 KB
実行使用メモリ 124,800 KB
最終ジャッジ日時 2026-08-18 20:15:40
合計ジャッジ時間 8,922 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 47
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from heapq import *

def solve():
    N,X=map(int,input().split())
    A=list(map(int,input().split()))
    B=[a^X for a in A]

    I=sorted(range(N),key=lambda i:A[i]+B[i])
    for k in range(N-1):
        if A[I[k]]>=B[I[k+1]] or B[I[k]]>=A[I[k+1]]:
            return False
    return True

print("Yes" if solve() else "No")

0