結果
| 問題 |
No.183 たのしい排他的論理和(EASY)
|
| コンテスト | |
| ユーザー |
eri
|
| 提出日時 | 2015-07-31 23:36:07 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 204 ms / 5,000 ms |
| コード長 | 301 bytes |
| コンパイル時間 | 592 ms |
| コンパイル使用メモリ | 54,236 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-29 02:35:06 |
| 合計ジャッジ時間 | 2,713 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include<iostream>
using namespace std;
#define REP(i, n) for(int(i)=0;(i)<(n);++(i))
bool dp[32768] = { true };
int main(){
int n; cin >> n;
REP(i, n){
int a; cin >> a;
REP(j, 32768) if (dp[j]) dp[j^a] = true;
}
int ans = 0;
REP(j, 32768) if (dp[j]) ans++;
cout << ans << endl;
return 0;
}
eri