二分
文章平均质量分 74
czdb
这个作者很懒,什么都没留下…
展开
-
Can you find it? HDU - 2141
Give 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+Ck = X. InputThe原创 2016-12-16 11:57:49 · 257 阅读 · 0 评论 -
广工校赛B.跳一跳,很简单的(hash+二分+lca)
题目连接:https://www.nowcoder.com/acm/contest/90/B 思路:首先根据题目意思很容易知道这棵树只有26种形态,我们可以处理出这26种形态,然后怎么去判断字典序呢,我们只用找到第一个不相同的位置就行,然后用lca去判断,着不同的位置可以二分找,也可以直接lca找,判断相等用hash即可,这道题十分毒瘤,相同的代码能相差六七百毫秒,能剪枝的就剪把 accode...原创 2018-03-27 09:17:29 · 187 阅读 · 0 评论 -
K-th Number HDU - 6231 (二分+尺取)(好题)
Alice are given an array A[1..N] with N numbers. Now Alice want to build an array B by a parameter K as following rules: Initially, the array B is empty. Consider each interval原创 2017-11-15 21:16:50 · 451 阅读 · 0 评论 -
Monitor(二分,二维前缀和板子记录)
Monitortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Luba bought a monitor. Monitor is a rectan原创 2017-09-09 19:26:50 · 340 阅读 · 0 评论 -
Atcoder- Sports Festival(二分+暴力+思维+贪心)
B - Sports FestivalTime limit : 2sec / Memory limit : 256MBScore : 700 pointsProblem StatementTakahashi is hosting an sports meet. There are N people who will participate. These pe原创 2017-07-24 11:39:36 · 424 阅读 · 0 评论 -
799C-Fountains(二分+set优化)
C. Fountainstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputArkady plays Gardenscapes a lot. Arkady wants原创 2017-05-21 18:17:33 · 325 阅读 · 0 评论 -
Defense Lines UVA - 1471
题目链接:https://cn.vjudge.net/problem/UVA-1471思路:第一步容易想到求出以i为终点的最长连续子序列f[i],以j为起点的g[j],那么答案就是max(f[i]+g[i]),那么怎么去找到i,和j能,那么最容易想到的就是暴力拉,枚举i,j,数据太大比超时,其实根据暴力的那个方法,我们可以想得到跟求LIS有点像,其实这个就是求LIS,不过这个只能求一段原创 2017-05-09 16:38:12 · 216 阅读 · 0 评论 -
选择困难症
Description小L有严重的选择困难症。早上起床后,需要花很长时间决定今天穿什么出门。假设一共有kk类物品需要搭配选择,每类物品的个数为AiAi,每个物品有一个喜欢值VjVj,代表小L对这件物品的喜欢程度。小L想知道,有多少种方案,使得选出来的物品喜欢值之和>M>M需要注意,每类物品,至多选择1件,可以不选。Input多组输入每组数据第一行输入原创 2017-04-26 18:41:39 · 671 阅读 · 0 评论 -
Aggressive cows POJ - 2456
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,...,xN (0 <= xi <= 1,000,000,000).His C (2 <= C <= N) cows原创 2016-12-16 18:23:58 · 320 阅读 · 0 评论 -
D - Cable master POJ - 1064
Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever. It was decided to co原创 2016-12-16 12:59:50 · 371 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第二场) transfrom(二分+尺取)
链接:https://www.nowcoder.com/acm/contest/140/G 来源:牛客网题目描述 White Cloud placed n containers in sequence on a axes. The i-th container is located at x[i] and there are a[i] number of products in it. ...原创 2018-07-24 00:11:25 · 201 阅读 · 0 评论