結果
| 問題 |
No.183 たのしい排他的論理和(EASY)
|
| コンテスト | |
| ユーザー |
trineutron
|
| 提出日時 | 2021-01-04 04:15:47 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 428 bytes |
| コンパイル時間 | 1,891 ms |
| コンパイル使用メモリ | 197,880 KB |
| 最終ジャッジ日時 | 2025-01-17 09:33:14 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a.at(i);
}
vector<bool> dp(1 << 14);
dp.at(0) = true;
for (int i = 0; i < n; i++) {
for (int j = 0; j < 1 << 14; j++) {
dp.at(j) = dp.at(j) || dp.at(a.at(i) ^ j);
}
}
cout << count(dp.begin(), dp.end(), true) << endl;
}
trineutron