二分法
文章平均质量分 82
crystaljy
这个作者很懒,什么都没留下…
展开
-
Light oj 1138 -Trailing Zeroes (III)
Trailing Zeroes (III) You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For example, 5! = 120, 12原创 2017-07-27 19:38:45 · 360 阅读 · 0 评论 -
二分--lower_bound()函数,upper_bound()函数
#include #include using namespace std; int main() { int num[20] = {1,2,3,4,5,5,5,6,7,10}; int k = 6; int pos1 = lower_bound(num,num+10,k)- num; printf ("%d\n",pos1); return 0; }原创 2017-07-28 10:41:11 · 265 阅读 · 0 评论