ACM注意事項

  2.lower_bound 在從小到大的排序數組中, lower_bound( begin,end,num):從數組的begin位置到end-1位置二分查找第一個大於或等於num的數字,找到返回該數字的地址,不存在則返回end。通過返回的地址減去起始地址begin,得到找到數字在數組中的下標。 upper_bound( begin,end,num):從數組的begin位置到end-1位置二分查
相關文章
相關標籤/搜索