二分查找
横济沧海
这个作者很懒,什么都没留下…
展开
-
HDU 2141 二分查找
Problem DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj原创 2017-07-27 14:29:32 · 720 阅读 · 0 评论 -
数据结构 顺序查找和二分查找
/*Sequential Search*/#include#include#include#include#include#include#includeusing namespace std;int Sequential_Search(int a[],int n,int key)//普通顺序查找{ int i; for(i=0; i<n; i++)原创 2017-11-11 20:36:00 · 1214 阅读 · 0 评论 -
网易_分田地
网易_分田地java代码4 43332323333322323输出2题意:题目意思是将一块举行分成16块,然后牛牛取得其中最小的那一块,但是由于横竖都切三刀的位置不一样即切法不同,就会得出不同的结果,现在求的是这些分法中牛牛可以取得的最大值。思路:二分查找+4层for循环嵌套反正牛牛是取得分法中最小的一块,如果要使分得的价值尽可能大,难么这16块要尽量均匀,这...原创 2018-09-06 11:37:37 · 167 阅读 · 0 评论