結果
| 問題 | No.183 たのしい排他的論理和(EASY) |
| コンテスト | |
| ユーザー |
cureskol
|
| 提出日時 | 2020-04-10 13:49:00 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 6 ms / 5,000 ms |
| + 426µs | |
| コード長 | 329 bytes |
| 記録 | |
| コンパイル時間 | 1,008 ms |
| コンパイル使用メモリ | 190,224 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-27 14:19:22 |
| 合計ジャッジ時間 | 2,724 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
signed main(){
int n;cin>>n;
set<int> s;
queue<int> que;
s.insert(0);
while(n--){
int a;cin>>a;
if(s.count(a))continue;
for(int p:s)que.push(p);
while(que.size()){
int p=que.front();que.pop();
s.insert(p^a);
}
}
cout<<s.size()<<endl;
}
cureskol