結果
| 問題 |
No.2672 Subset Xor Sum
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-06 11:30:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 542 bytes |
| コンパイル時間 | 1,866 ms |
| コンパイル使用メモリ | 172,028 KB |
| 実行使用メモリ | 7,236 KB |
| 最終ジャッジ日時 | 2024-08-06 11:30:08 |
| 合計ジャッジ時間 | 6,298 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 53 WA * 13 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
const int64_t inf = 1e18;
const int64_t mod = 998244353;
// const int64_t mod = 1000000007;
int main() {
int n;
cin >> n;
vector<long long> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
vector<long long> b;
for (int i = 0; i < n; i++) {
for (auto x: b) {
a[i] = min(a[i], a[i]^x);
}
if (a[i] > 0) b.push_back(a[i]);
}
int m = b.size();
if (n - m < 2) cout << "No" << endl;
else cout << "Yes" << endl;
}