二分搜索
讲解二分搜索类型的经典题目
随意凯
这个作者很懒,什么都没留下…
展开
-
POJ 1759 详解二分可以解决的原因
DescriptionThe New Year garland consists of N lamps attached to a common wire that hangs down on the ends to which outermost lamps are affixed. The wire sags under the weight of lamp in a particular way: each lamp is hanging at the height that is 1 millim原创 2020-07-27 09:42:14 · 240 阅读 · 0 评论 -
POJ Telephone Lines 二分搜索+Dijkstra方法=最小化第k个值
DescriptionFarmer John wants to set up a telephone line at his farm. Unfortunately, the phone company is uncooperative, so he needs to pay for some of the cables required to connect his farm to the phone system.There are N (1 ≤ N ≤ 1,000) forlorn telepho原创 2020-07-25 21:15:23 · 135 阅读 · 0 评论 -
POJ 3685 双重二分法解题
DescriptionGiven a N × N matrix A, whose element in the i-th row and j-th column Aij is an number that equals i^2 + 100000 × i + j^2 - 100000 × j + i × j, you are to find the M-th smallest element in the matrix.InputThe first line of input is the number原创 2020-07-24 20:53:28 · 302 阅读 · 0 评论