結果
問題 |
No.2195 AND Set
|
ユーザー |
|
提出日時 | 2024-04-11 13:32:04 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 550 bytes |
コンパイル時間 | 6,148 ms |
コンパイル使用メモリ | 255,792 KB |
最終ジャッジ日時 | 2025-02-20 23:52:35 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 1 TLE * 1 -- * 11 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; using ld = long double; using mint = modint998244353; int main() { int Q; cin >> Q; set<int> st; while (Q--) { int t; cin >> t; if (t == 1) { int x; cin >> x; st.insert(x); } else if (t == 2) { int x; cin >> x; st.erase(x); } else { uint ans = 0xFFFFFFFF; for (auto x: st) { ans &= x; } cout << (ans == 0xFFFFFFFF ? (int)-1: (int)ans) << endl; } } }