結果
| 問題 | No.184 たのしい排他的論理和(HARD) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-25 03:44:12 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 5,000 ms |
| コード長 | 428 bytes |
| 記録 | |
| コンパイル時間 | 2,993 ms |
| コンパイル使用メモリ | 275,032 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-27 04:36:27 |
| 合計ジャッジ時間 | 6,067 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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();
}