Artifact Content
Not logged in

Artifact 6993ff5a52ea6cbc94700224a0cb109777798c43


lb = lower_bound(k)
  ... k-1] lb [k ...


ub = upper_bound(k)
  .., k] ub [k+1 ...


なので任意の開閉区間をイテレータの [) 区間に直すには

  [A, B]
    = [ lower_bound(A), upper_bound(B) )

  [A, B)
    = [ lower_bound(A), lower_bound(B) )

  (A, B]
    = [ upper_bound(A), upper_bound(B) )

  (A, B)
    = [ upper_bound(A), lower_bound(B) )