結果
問題 | No.184 たのしい排他的論理和(HARD) |
ユーザー |
![]() |
提出日時 | 2020-11-18 22:00:04 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 188 ms / 5,000 ms |
コード長 | 386 bytes |
コンパイル時間 | 2,178 ms |
コンパイル使用メモリ | 198,212 KB |
最終ジャッジ日時 | 2025-01-16 01:36:19 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int N; set<ll> S; cin >> N; while (N--) { ll A; cin >> A; auto it = S.rbegin(); while (it != S.rend()) { A = min(A, A ^ *it); it++; } S.insert(A); } S.erase(0ll); cout << (1ll << (S.size())) << endl; }