
c++ 二分
碳酸钙的01妖精
这个作者很懒,什么都没留下…
展开
-
POJ-2785 4 Values whose Sum is 0(二分)
POJ-2785 4 Values whose Sum is 0(二分) The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D ...原创 2018-03-03 20:04:42 · 247 阅读 · 0 评论 -
POJ-3104 Drying(二分)
POJ-3104 Drying(二分) DescriptionIt is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has decided to use a...原创 2018-03-03 20:06:33 · 163 阅读 · 0 评论 -
POJ-3122 pie(二分)
POJ-3122 pie(二分)My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my ...原创 2018-03-03 20:08:41 · 201 阅读 · 0 评论 -
POJ-3273 Monthly Expense(二分)
POJ-3273 Monthly Expense(二分) 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 amo...原创 2018-03-03 20:10:19 · 125 阅读 · 0 评论 -
POJ-3258 River Hopscotch(二分)
POJ-3258 River Hopscotch(二分) Every year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on...原创 2018-03-03 20:11:35 · 183 阅读 · 0 评论 -
P1020 导弹拦截(最长子上升序列+Dliworth定理)
P1020 导弹拦截(最长子上升序列+Dliworth定理) 题目描述某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能高于前一发的高度。某天,雷达捕捉到敌国的导弹来袭。由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹。输入导弹依次飞来的高度(雷达给出的高度数据是 ...原创 2018-07-13 16:46:12 · 415 阅读 · 0 评论 -
二分搜索
二分搜索#include <stdio.h>#include <stdlib.h>#define MAXN 200000int a[MAXN];int n,m;int BinarySearch(int x){ int flag=0; int left=1; int right=n; while(left<=right) ...原创 2018-06-29 10:04:42 · 159 阅读 · 0 评论