标签: 二分查找

  1. C++对一个有序序列[first, last)(first、last都是iterator,可简单理解为位置指针),以及指定值v,标准库直接提供二分查找的函数std::lower_bound和std::upper_bould: