結果
| 問題 |
No.183 たのしい排他的論理和(EASY)
|
| コンテスト | |
| ユーザー |
h_noson
|
| 提出日時 | 2016-02-16 19:29:06 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 483 bytes |
| コンパイル時間 | 472 ms |
| コンパイル使用メモリ | 59,740 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-22 07:18:06 |
| 合計ジャッジ時間 | 2,367 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 RE * 3 |
ソースコード
#include <iostream>
#include <map>
using namespace std;
int main() {
int n;
cin >> n;
bool dp[16385];
fill(dp,dp+16385,false);
dp[0] = true;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
for (int j = 0; j < 16385; j++) {
if (dp[j])
dp[j^a] = true;
}
}
int ans = 0;
for (int i = 0; i < 16385; i++) {
if (dp[i])
ans++;
}
cout << ans << endl;
return 0;
}
h_noson