2010-11-18から1日間の記事一覧
STL の upper_bound / lower_bound を使ってみたらハマったので、日記のネタに。 結論を書くと、 std::upper_bound( first, last, x ) は、区間 [ iter, last ) が std::equal_range( first, last, x ) の上界となるような iter を、 std::lower_bound( firs…
STL の upper_bound / lower_bound を使ってみたらハマったので、日記のネタに。 結論を書くと、 std::upper_bound( first, last, x ) は、区間 [ iter, last ) が std::equal_range( first, last, x ) の上界となるような iter を、 std::lower_bound( firs…