1,lower_bound
用法:
a[] 中查询k的位置
找的是大于等于他的第一个数,返回值为对应下标
x=lower_bound(a+1,a+n+1,k)-a;
2,upper_bound
用法:
a[] 中查询k的位置
找的是大于他的第一个数,返回值为对应下标
x=upper_bound(a+1,a+n+1,k)-a;
标签:gpo http blog 一个 等于 分享 nbsp div ima
1,lower_bound
用法:
a[] 中查询k的位置
找的是大于等于他的第一个数,返回值为对应下标
x=lower_bound(a+1,a+n+1,k)-a;
2,upper_bound
用法:
a[] 中查询k的位置
找的是大于他的第一个数,返回值为对应下标
x=upper_bound(a+1,a+n+1,k)-a;
lower_bound() && upper_bound()
标签:gpo http blog 一个 等于 分享 nbsp div ima
原文地址:https://www.cnblogs.com/adelalove/p/8492483.html