結果
問題 |
No.184 たのしい排他的論理和(HARD)
|
ユーザー |
|
提出日時 | 2021-09-27 03:32:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 75 ms / 5,000 ms |
コード長 | 332 bytes |
コンパイル時間 | 1,548 ms |
コンパイル使用メモリ | 168,712 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 18:07:43 |
合計ジャッジ時間 | 4,188 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; long v,ans=1; vector<long> base; for(int i=0;i<n;i++){ cin>>v; for(auto e:base){ v=min(v,v^e); } if(v>0){ base.push_back(v); ans*=2; } } cout<<ans<<endl; }