issues
search
tipstar0125
/
atcoder
atcoder
6
stars
0
forks
source link
mex
#30
Open
tipstar0125
opened
7 months ago
tipstar0125
commented
7 months ago
長さNの非負整数列のmexは0以上N以下
つまり、N+1以上のものは無視して良い
存在する数を配列でカウント、存在しないものをBTreeSetでもって、最小を取り出す
tipstar0125
commented
7 months ago
セグ木で殴れる
https://github.com/tipstar0125/atcoder/issues/23
https://atcoder.jp/contests/abc330/tasks/abc330_e
https://atcoder.jp/contests/abc330/submissions/47953861
tipstar0125
commented
7 months ago
要素の追加・削除と mex を対数時間で処理するよ
https://atcoder.jp/contests/hhkb2020/tasks/hhkb2020_c