摘要: const double eps = 1e-5; double func(double x) { return x*x; } double s_qrt(double low,double high,double obj) { double mid; while(high-low>eps) { mid 阅读全文
posted @ 2020-03-13 15:19 ecnu_lxz 阅读(1210) 评论(0) 推荐(0) 编辑
摘要: 1 int bin_search(ElementType a[], int num,ElementType obj) 2 { 3 int low=0,high=num-1,mid; 4 while(low<=high) 5 { 6 mid=(low+high)/2; 7 if(a[mid]==obj 阅读全文
posted @ 2020-03-13 13:02 ecnu_lxz 阅读(168) 评论(0) 推荐(0) 编辑