結果
問題 |
No.183 たのしい排他的論理和(EASY)
|
ユーザー |
![]() |
提出日時 | 2018-01-10 17:26:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 353 bytes |
コンパイル時間 | 1,515 ms |
コンパイル使用メモリ | 163,452 KB |
実行使用メモリ | 9,984 KB |
最終ジャッジ日時 | 2024-12-23 15:39:45 |
合計ジャッジ時間 | 40,159 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 TLE * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; set<int> dp; int n; int main() { cin >> n; dp.insert(0); for(int i = 0; i < n; i++) { int a; cin >> a; for(auto itr = dp.begin(); itr != dp.end(); ++itr) { if(dp.find((*itr) ^ a) == dp.end()) { dp.insert((*itr) ^ a); } } } cout << dp.size() << endl; }