結果
問題 | No.184 たのしい排他的論理和(HARD) |
ユーザー |
|
提出日時 | 2022-08-25 03:44:12 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 54 ms / 5,000 ms |
コード長 | 428 bytes |
コンパイル時間 | 4,318 ms |
コンパイル使用メモリ | 251,796 KB |
最終ジャッジ日時 | 2025-01-31 03:54:31 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 |
ソースコード
#include<bits/stdc++.h> using namespace std; #include<atcoder/all> using namespace atcoder; using ll = long long; int n; vector<ll> a; void solve(){ vector<ll> base; for(auto &v:a){ for(auto &e:base){ v = min(v,v^e); } if(v)base.push_back(v); } cout<<(1ll<<(base.size()))<<endl; } signed main(){ cin.tie(nullptr); ios::sync_with_stdio(false); cin >> n; a = vector<ll>(n); for(auto &i:a)cin >> i; solve(); }