結果
問題 |
No.2024 Xer
|
ユーザー |
|
提出日時 | 2025-09-26 05:41:42 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 52 ms / 2,000 ms |
コード長 | 667 bytes |
コンパイル時間 | 3,224 ms |
コンパイル使用メモリ | 285,828 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-09-26 05:41:58 |
合計ジャッジ時間 | 7,463 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 47 |
ソースコード
// #pragma GCC optimize ("Ofast") // #pragma GCC optimize ("unroll-loops") // #pragma GCC target ("avx,avx2,fma") #include <bits/stdc++.h> using std::cin, std::cout, std::cerr; using ll = long long; int main() { std::ios::sync_with_stdio(false); int n, x; cin >> n >> x; std::vector<std::pair<int, int>> p(n); for(int i = 0; i < n; i ++) { int a; cin >> a; p[i] = {a & ~x, a}; } std::ranges::sort(p); bool ok = true; for(int i = 0; i + 1 < n; i ++) { int s = p[i].second, t = p[i + 1].second; if(s >= (t ^ x) || (s ^ x) >= t) ok = false; } cout << (ok ? "Yes" : "No") << '\n'; }