結果
| 問題 | No.183 たのしい排他的論理和(EASY) |
| コンテスト | |
| ユーザー |
osa_k
|
| 提出日時 | 2015-07-27 01:06:03 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 242 ms / 5,000 ms |
| コード長 | 653 bytes |
| 記録 | |
| コンパイル時間 | 632 ms |
| コンパイル使用メモリ | 74,928 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-18 11:56:39 |
| 合計ジャッジ時間 | 2,870 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
//Name:
//Level:
//Category:
//Note:
/**
*
*/
#include <iostream>
#include <bitset>
using namespace std;
bool solve(bool first) {
int N;
if(!(cin >> N)) return false;
bitset<1<<15> table;
table[0] = 1;
for(int i = 0; i < N; ++i) {
int a;
cin >> a;
for(int j = 0; j < (1<<15); ++j) {
if(table[j]) table[a^j] = 1;
}
}
cout << table.count() << endl;
return true;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(0);
cout.setf(ios::fixed);
cout.precision(10);
bool first = true;
while(solve(first)) {
first = false;
}
return 0;
}
osa_k