二分
星辰浩宇
路在脚下
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Assemble UVALive - 3971(二分搜索)
二分搜索 最小值的最大值的简单应用(注意区间左开右闭,每次的中心值M=(L+R+1)/2; #include<bits/stdc++.h> using namespace std; typedef long long ll; struct node{ int price,quality; node(){ } node(int p,int q){ price=p;...原创 2019-07-26 11:13:55 · 149 阅读 · 0 评论 -
openjudge-2456——Aggressive cows(二分法)
2456:Aggressive cows 总时间限制: 1000ms 内存限制: 65536kB 描述 Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,....原创 2019-07-26 11:54:22 · 210 阅读 · 0 评论 -
4135:Monthly Expense(二分法)
总时间限制: 1000ms 内存限制: 65536kB 描述 Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the exact amount o...原创 2019-07-26 15:39:15 · 216 阅读 · 0 评论 -
计蒜客-轻重搭配(二分)
采用二分法,求配对的最小的的最大值即可 #include<bits/stdc++.h> using namespace std; const int N=500050; int a[N]; int n; int main(){ scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%d",&a[i]); s...原创 2019-08-01 09:49:02 · 469 阅读 · 0 评论
分享