![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
二分
文章平均质量分 76
black_miracle
这个作者很懒,什么都没留下…
展开
-
UVALive 4254 二分
题意:t个测试样例,每个测试样例有n个任务,给你起始时间、终止时间和任务量,每个任务必须在起始时间和终止时间之间完成(包括边界),现在要找出一个最小的每分钟处理的任务量,使得可以在规定时间内完成n个任务。 做法:二分,先用优先队列排序,先做已经开始且最早结束的,如果队列非空,判断当前的任务是否在规定的时间,如果不在,那么这个时间就不行。 #include #include #i原创 2016-04-29 14:27:29 · 298 阅读 · 0 评论 -
CodeForces 626C 二分
Block Towers time limit: per test 2 seconds memory limit: per test 256 megabytes input: standard input output: standard output Students in a class are making towers of block原创 2016-04-24 21:38:51 · 389 阅读 · 0 评论 -
USACO 2016 Feb Circular Barn 二分+树状数组
Being a fan of contemporary architecture, Farmer John has built a new barn in the shape of a perfect circle. Inside, the barn consists of a ring of nn rooms, numbered clockwise from 1…n1…n around原创 2017-03-13 21:55:38 · 561 阅读 · 0 评论 -
SPOJ MINSUB 二分+单调栈
Largest Submatrix no tags You are given an matrix M (consisting of nonnegative integers) and an integer K. For any submatrix of M' of M define min(M') to be the minimum value of all the原创 2017-01-22 13:59:45 · 279 阅读 · 0 评论 -
Codeforces 732D 二分
Exams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasiliy has an exam period which will continue for n d原创 2017-02-21 22:53:08 · 190 阅读 · 0 评论 -
Codeforces 671B 二分
Robin Hood time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output We all know the impressive story of Robin Hood. R原创 2017-03-01 23:32:29 · 291 阅读 · 0 评论 -
SPOJ FACVSPOW 数论+二分
Factorial vs Power Consider two integer sequences f(n) = n! and g(n) = an, where n is a positive integer. For any integer a > 1 the second sequence is greater than the first for a finite number原创 2017-02-20 17:23:53 · 367 阅读 · 0 评论 -
Codeforces 740D dfs+二分
Alyona and a tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Alyona has a tree with n vertices. The ro原创 2016-11-29 16:27:35 · 367 阅读 · 0 评论 -
2016-2017 ACM-ICPC, NEERC, Southern Subregional Contest c 二分+bfs
Bulmart time limit per test 1.5 seconds memory limit per test 512 megabytes input standard input output standard output A new trade empire is rising in Berland. Bulmart,原创 2016-10-31 20:44:12 · 373 阅读 · 0 评论 -
HDU 5806 二分
NanoApe Loves Sequence Ⅱ Accepts: 374 Submissions: 946 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others) 问题描述 退役狗 NanoApe 滚回去学文化课啦! 在数学课上,N原创 2016-08-07 10:48:36 · 327 阅读 · 0 评论 -
Codeforces 492d 二分
Vanya and Computer Game time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vanya and his friend Vova play a co原创 2016-08-06 00:01:58 · 189 阅读 · 0 评论 -
codeforces 1100E
传送门:http://codeforces.com/contest/1100/problem/E 题意:给出一个有向图,每条边的反转需要的控制器级别数,问最少需要多少级的控制器,反转一些边后使得这个图没有环。 题解:首先肯定想到二分答案,如果当前二分后还有环,那么就是级别过低,检测是否有环可以用拓扑排序做到,如果没有环就说明这个级别可行,具体反转哪条边,只要可以反转的边在原来的拓扑序中是正确的...原创 2019-01-15 20:16:29 · 219 阅读 · 0 评论