結果
| 問題 |
No.183 たのしい排他的論理和(EASY)
|
| コンテスト | |
| ユーザー |
iqueue02
|
| 提出日時 | 2019-10-25 20:33:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 428 bytes |
| コンパイル時間 | 1,520 ms |
| コンパイル使用メモリ | 168,196 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-22 06:43:45 |
| 合計ジャッジ時間 | 4,372 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 2 RE * 16 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n);i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef pair<int,int> P;
const int m = 16385;
int dp[m];
int main(){
int n;
cin >> n;
vector<int> a(n);
rep(i,n) cin >> a[i];
dp[0] = 1;
rep(i,n){
rep(j,m){
dp[j ^ a[i]] = dp[j];
}
}
int res = 0;
rep(i,m) res += dp[i];
cout << res << endl;
return 0;
}
iqueue02