結果
| 問題 |
No.2024 Xer
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 20:49:11 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 285 ms / 2,000 ms |
| コード長 | 387 bytes |
| コンパイル時間 | 300 ms |
| コンパイル使用メモリ | 82,180 KB |
| 実行使用メモリ | 110,484 KB |
| 最終ジャッジ日時 | 2025-04-15 20:50:20 |
| 合計ジャッジ時間 | 7,205 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 47 |
ソースコード
n, x = map(int, input().split())
a = list(map(int, input().split()))
# Custom sort based on the minimum of a and a^x
a.sort(key=lambda val: min(val, val ^ x))
possible = True
for i in range(n-1):
ai = a[i]
ai1 = a[i+1]
cond1 = ai < (ai1 ^ x)
cond2 = (ai ^ x) < ai1
if not (cond1 and cond2):
possible = False
break
print("Yes" if possible else "No")
lam6er