
二分搜索
文章平均质量分 78
要认认真真
这个作者很懒,什么都没留下…
展开
-
Pie
Pie Time Limit : 5000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 80 Accepted Submission(s) : 28Problem DescriptionMy birthday is coming up and tradit原创 2014-05-28 10:26:42 · 292 阅读 · 0 评论 -
Strange fuction
Strange fuctionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2949 Accepted Submission(s): 2177Problem DescriptionNow, here is a原创 2014-05-28 10:54:33 · 322 阅读 · 0 评论 -
Can you solve this equation?
Can you solve this equation?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7689 Accepted Submission(s): 3574Problem DescriptionN原创 2014-05-28 10:56:25 · 324 阅读 · 0 评论 -
二分搜索入门
二分搜索--折半查找都是一个意思,原创 2014-05-28 10:17:20 · 329 阅读 · 0 评论 -
Shell Pyramid--tle
默默地超时了。。。我调了好久呢。。。不过还是有所有收获,1.二分可以用来查某数字x是否在递增序列中low=0;high=n-1;while(high>=low){ mid=(low+high)/2; if(x>buf[mid]){ low=mid+1; } else if(x high=mid-1;原创 2014-05-16 16:39:25 · 337 阅读 · 0 评论 -
Can you find it?
//title:2141 Can you find it? //问题分类:二分,先将ab相加为s,判断 s[i]+c[j]?=x//即用二分查询找s中是否存在x-c[j] //时间复杂度:500(查找次数) *log2(250000)(2的20次为100万),约等于500*20 #include#include#includeusing namespace std;原创 2014-05-18 20:27:44 · 413 阅读 · 0 评论 -
Cup---wa
//title:HDU2289 Cup//问题分类:二分解方程,和2199判断方法,1969思路很像,就是公式比较复杂 #include#includedouble pi = acos(-1.0);//圆台体积:v=pi*h(R*R+R*r+r*r)/3double getv(double r,double R,double H,double h){ double原创 2014-05-18 22:25:15 · 362 阅读 · 0 评论