-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[問題案] Set xor-minimum #499
Comments
良さそうです!
Set Xor-Min とかかなぁ
クエリはmultisetよりsetのほうが自然な気がします、
がいいと思います。
実測次第、ですかね… |
あとはxの上限なんですけど2^30か2^31か2^32で悩んでます(10^9に近づけるかsignedに合わせるかunsignedに合わせるか) |
2^30か2^32かなと思います。どちらでも大丈夫(=この問題を準備する人が好きに決めていい)ですが、個人的には2^30を推しておきます |
分かりました |
Merged
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
問題ID: set_xor_minimum
問題名: Set xor-minimum
想定アルゴリズム: Binary Trie
Binary Trie特有のといえばこれな気がしたので
問題概要
整数の(重複を許す)集合Sがあって最初空です。
クエリをQ個処理してください
0 x
xをSに1つ追加1 x
xをSから1つ削除2 x
min_{ i ∈ S } i xor x を出力する入力
出力
2 x
の形式のクエリごとに1行ずつ制約
Q <= 500000 ? 200000 ?
0 <= x < 2^30
2 x
が来るときSは空でないmultiじゃないsetにしてもいいかもしれない
The text was updated successfully, but these errors were encountered: