結果
問題 |
No.183 たのしい排他的論理和(EASY)
|
ユーザー |
![]() |
提出日時 | 2015-05-12 19:16:44 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 354 bytes |
コンパイル時間 | 801 ms |
コンパイル使用メモリ | 70,760 KB |
実行使用メモリ | 14,024 KB |
最終ジャッジ日時 | 2024-07-06 00:37:38 |
合計ジャッジ時間 | 7,459 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 TLE * 1 -- * 12 |
ソースコード
#include <iostream> #include <unordered_set> using namespace std; int main() { int n; while (cin>>n) { unordered_set<int> dp; dp.insert(0); while (n--) { auto next=dp; int a; cin>>a; for(int v: dp) next.insert(a^v); dp=next; } cout<<dp.size()<<endl; } }