概要 二分探索とは アルゴリズム 計算量 C++ で二分探索を実装 実装 実装上の注意点 C++ 標準ライブラリで二分探索 std::binary_search() std::lower_bound() と std::upper_bound() 用法 std::lower_bound(),std::upper_bound() の活用 二分探索を行う 要素のインデックスを求める ある数以上(より大きい)要素の数を数える 二分探索で競プロの問題を解く AOJ: ALDS1_4_B - Binary Search ABC061: C - Big Array std::lower_bound() を使用する解法 std::lower_bound() を使用しない解法 ABC084: C - Snuke Festival 難しめ?な問題 補足:std::lower_bound() を使う上での注意点