二分函数
摘要:
二分降序(找第一个小于或小于等于的数) int n=5;//5个元素 a[0]=9,a[1]=7,a[2]=5,a[3]=3,a[4]=1;//降序 cout<<lower_bound(a,a+n,5,greater<int>())-a<<endl;//得到的是下标 2 cout<<upper_bo 阅读全文
posted @ 2020-10-29 15:07
Chri_K
阅读(26)
评论(0)
推荐(0)
浙公网安备 33010602011771号