23dfcca431 2011-02-23 kinaba: lb = lower_bound(k) 23dfcca431 2011-02-23 kinaba: ... k-1] lb [k ... 23dfcca431 2011-02-23 kinaba: 23dfcca431 2011-02-23 kinaba: 23dfcca431 2011-02-23 kinaba: ub = upper_bound(k) 23dfcca431 2011-02-23 kinaba: .., k] ub [k+1 ... 23dfcca431 2011-02-23 kinaba: 23dfcca431 2011-02-23 kinaba: 23dfcca431 2011-02-23 kinaba: なので任意の開閉区間をイテレータの [) 区間に直すには 23dfcca431 2011-02-23 kinaba: 23dfcca431 2011-02-23 kinaba: [A, B] 23dfcca431 2011-02-23 kinaba: = [ lower_bound(A), upper_bound(B) ) 23dfcca431 2011-02-23 kinaba: 23dfcca431 2011-02-23 kinaba: [A, B) 23dfcca431 2011-02-23 kinaba: = [ lower_bound(A), lower_bound(B) ) 23dfcca431 2011-02-23 kinaba: 23dfcca431 2011-02-23 kinaba: (A, B] 23dfcca431 2011-02-23 kinaba: = [ upper_bound(A), upper_bound(B) ) 23dfcca431 2011-02-23 kinaba: 23dfcca431 2011-02-23 kinaba: (A, B) 23dfcca431 2011-02-23 kinaba: = [ upper_bound(A), lower_bound(B) )