結果
| 問題 | No.184 たのしい排他的論理和(HARD) |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-10-17 08:39:11 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 31 ms / 5,000 ms |
| + 221µs | |
| コード長 | 512 bytes |
| 記録 | |
| コンパイル時間 | 1,070 ms |
| コンパイル使用メモリ | 178,836 KB |
| 実行使用メモリ | 9,920 KB |
| 最終ジャッジ日時 | 2026-10-17 08:39:31 |
| 合計ジャッジ時間 | 5,311 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
long long bs[65];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
int r = 0;
for (int i = 0; i < n; i++) {
long long x;
cin >> x;
for (int j = 60; j >= 0; j--) {
if (!(x >> j)) continue;
if (!bs[j]) {
bs[j] = x;
r++;
break;
}
x ^= bs[j];
}
}
cout << (1LL << r) << "\n";
return 0;
}
vjudge1