
基本算法--二分
淼润淽涵
这个作者很懒,什么都没留下…
展开
-
HDU 3714 Error Curves(三分)
Problem DescriptionJosephina is a clever girl and addicted to Machine Learning recently. Shepays much attention to a method called Linear Discriminant Analysis, whichhas many interesting properti...原创 2019-11-19 17:07:56 · 304 阅读 · 0 评论 -
HDU - 5178 - pairs(二分)
Problem DescriptionJohn has n points on the X axis, and their coordinates are (x[i],0),(i=0,1,2,…,n−1). He wants to know how many pairs<a,b> that |x[b]−x[a]|≤k.(a<b)InputThe first l...原创 2019-11-19 09:05:51 · 391 阅读 · 0 评论 -
HDU 2141 Can you find it?(二分)
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+...原创 2019-11-19 00:59:07 · 143 阅读 · 0 评论 -
Can you solve this equation?(二分)
Problem DescriptionNow,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100;Now please try your luckyInputThe first line of the input conta...原创 2019-05-01 22:18:17 · 1270 阅读 · 1 评论 -
HDU 2899 (二分)
Problem DescriptionNow, here is a fuction:F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 <= x <=100)Can you find the minimum value when x is between 0 and 100.InputThe first line of th...原创 2019-05-02 12:03:51 · 140 阅读 · 0 评论 -
codeforces 957C -Three-level Laser(二分+数学)
Problem DescriptionAn atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is ...原创 2019-05-10 22:20:45 · 336 阅读 · 0 评论 -
POJ 1905 Expanding Rods(二分)
Problem DescriptionWhen a thin rod of length L is heated n degrees, it expands to a new length L'=(1+n*C)*L, where C is the coefficient of heat expansion.When a thin rod is mounted on two solid wa...原创 2019-05-11 22:48:10 · 188 阅读 · 0 评论 -
二分查找之求最大值的最小值
题目链接:点击这里看到题目中的“最大值最小”就知道这题主要考察的是用二分法求满足条件的最小值所以关于mid的求法如下:while(l < r){ mid = (l + r)/2;//注意是(l+r) if(judge(mid))//符合条件 r = mid; else l = mid + 1;}其中的mid = (l + r)/2;详...原创 2019-07-25 10:03:45 · 2005 阅读 · 0 评论