結果
| 問題 | No.183 たのしい排他的論理和(EASY) |
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-11-05 16:25:10 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 99 ms / 5,000 ms |
| + 809µs | |
| コード長 | 569 bytes |
| 記録 | |
| コンパイル時間 | 1,123 ms |
| コンパイル使用メモリ | 211,832 KB |
| 実行使用メモリ | 9,900 KB |
| 最終ジャッジ日時 | 2026-10-12 17:22:33 |
| 合計ジャッジ時間 | 3,148 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 19 |
ソースコード
#include <bits/stdc++.h>
#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<bitset>
using ll = long long;
using namespace std;
int main(){
int n, MAX = 1 << 15, cnt = 0;
cin >> n;
vector<int> dp(MAX);
dp[0] = 1;
for (int i = 0; i < n; i++){
int tmp;
cin >> tmp;
for (int j = 0; j < MAX; j++){
if (dp[j]) dp[j ^ tmp] = 1;
}
}
for (auto x : dp) if (x) cnt++;
cout << cnt << endl;
}
kpinkcat