随笔分类 -  05.二分

摘要:题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4029 Time Limit: 1 Second Memory Limit: 131072 KB AC代码: 阅读全文
posted @ 2018-07-30 15:47 Dilthey 阅读(314) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6278 Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others) Problem Descrip 阅读全文
posted @ 2018-06-27 20:44 Dilthey 阅读(303) 评论(0) 推荐(0)
摘要:题目链接:http://codeforces.com/problemset/problem/551/C time limit per test 2 seconds memory limit per test 256 megabytes input standard input output stan 阅读全文
posted @ 2018-01-10 19:59 Dilthey 阅读(443) 评论(0) 推荐(0)
摘要:依然是来自2017/9/17的周赛水题…… 题目链接:https://cn.vjudge.net/problem/UVA-11881 题解: 观察这个函数: 由于CF[i]固定值,因此NPV(IRR)这个函数,是连续单减函数,其值域区间为从+∞到CF[0]; 那么显然的,NPV(IRR) = 0方程 阅读全文
posted @ 2017-09-18 22:33 Dilthey 阅读(300) 评论(0) 推荐(0)
摘要:Time limit per test: 2.0 seconds Time limit all tests: 15.0 seconds Memory limit: 256 megabytes Time limit per test: 2.0 seconds Time limit all tests: 阅读全文
posted @ 2017-05-12 23:12 Dilthey 阅读(365) 评论(0) 推荐(0)
摘要:RMQ应用题。 引用别人的解题思路: 阅读全文
posted @ 2017-05-04 23:21 Dilthey 阅读(246) 评论(0) 推荐(0)
摘要:二分查找。 阅读全文
posted @ 2017-04-07 23:18 Dilthey 阅读(234) 评论(0) 推荐(0)
摘要:题目大意:题目很长哈,简单来说,数轴上有n个石子,第i个石头的坐标为Di,现在要从0跳到L,每次条都从一个石子跳到相邻的下一个石子。现在FJ允许你移走M个石子,问移走这M个石子后,相邻两个石子距离的最小值的最大值是多少,因为移动有很多种方法,每一种有一个最小值距离,这些最小值里面的最大值(我之所以解释最后一句,是因为我兄弟他没懂--其实不是我翻译的,嘿嘿)。 思路:在这里二分的对象当然是距离咯... 阅读全文
posted @ 2017-03-16 22:27 Dilthey 阅读(150) 评论(0) 推荐(0)
摘要:Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5505 Accepted Submission(s): 1320 Problem Descr 阅读全文
posted @ 2017-03-14 22:58 Dilthey 阅读(234) 评论(0) 推荐(0)
摘要:time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output time limit per test 5 seconds time limit 阅读全文
posted @ 2017-03-13 23:08 Dilthey 阅读(325) 评论(0) 推荐(0)
摘要:time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output time limit per test 2 seconds time limit 阅读全文
posted @ 2017-03-13 22:57 Dilthey 阅读(287) 评论(0) 推荐(0)
摘要:Description 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,... 阅读全文
posted @ 2017-03-13 12:32 Dilthey 阅读(182) 评论(0) 推荐(0)