二分搜索
ltinor
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
010 Maximum Median
原题:You are given an array a of n integers, where n is odd. You can make the following operation with it:Choose one of the elements of the array (for example ai) and increase it by 1 (that is, replac...原创 2019-08-09 23:51:13 · 300 阅读 · 0 评论 -
022 Sand Fortress (CF985D)
题目链接:CF985D标签:二分、思维题目大意:对于给定的n、H,将n分成a1、a2、…、an,其中ai始终不大于H,且相邻两项之差不大于1,(且最后一项也必须为1)求最少分成几个数思路:此题的核心点在于确定最高峰的高度,有两种情况:1.等差数列1~H之和小于n,则总点的树目为H + [ ( n - S ) / H ] + 12.等差数列1~H之和大于n,则找出1-k,使得和数不...原创 2019-10-03 13:41:02 · 474 阅读 · 0 评论
分享