![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
二分
fl_334
这个作者很懒,什么都没留下…
展开
-
洛谷P1314聪明的质检员(二分)
小T 是一名质量监督员,最近负责检验一批矿产的质量。这批矿产共有 n 个矿石,从 1到n 逐一编号,每个矿石都有自己的重量 wi 以及价值vi 。检验矿产的流程是:1 、给定m 个区间[Li,Ri];2 、选出一个参数 W;3 、对于一个区间[Li,Ri],计算矿石在这个区间上的检验值Yi:这批矿产的检验结果Y 为各个区间的检验值之和。即:Y1+Y2...+原创 2017-02-18 13:31:55 · 282 阅读 · 0 评论 -
[luogu1429]平面最接近点对(二分)
给定平面上n个点,找出其中的一对点的距离,使得在这n个点的所有点对中,该距离为所有点对中最小的#include <iostream>#include <algorithm>#include <cmath>#include <cstdio>using namespace std;int n;struct Point{ double x,y; Point(){} Po原创 2017-07-17 13:19:50 · 253 阅读 · 0 评论 -
【luogu2759】奇怪的函数(二分,数论)
一个换底公式解决的事 https://www.luogu.org/problemnew/show/P2759 题摘使得 x^x 达到或超过 n 位数字的最小正整数 x 是多少? 求x^x次方的位数,可用x*log10(x)+1#include<iostream>#include<cmath>#define ll long...原创 2018-08-20 23:09:55 · 221 阅读 · 0 评论 -
【luogu3853】路标设置(二分,模拟)
题目大意把公路上相邻路标的最大距离定义为该公路的“空旷指数”,给出个路标距起点的距离,求最小“空旷指数”值简单二分+模拟即可#include<iostream>using namespace std;const int maxn=100010;int L,n,k;int a[maxn]; int pd (int tmp){ ...原创 2018-08-21 22:34:36 · 291 阅读 · 0 评论