
二分法
文章平均质量分 78
huadong_fcy56
这个作者很懒,什么都没留下…
展开
-
ZOJ 2002 Copying Books 二分 贪心
传送门:Zoj2002 题目大意:从左到右把一排数字k分,得到最小化最大份,如果有多组解,左边的尽量小。 思路:贪心+二分(参考青蛙过河)。 方向:从右向左。 注意:有可能最小化时不够k分。如 3 3 1 2 3 k分得到最小化的最大是3,却只原创 2017-08-19 15:20:07 · 243 阅读 · 0 评论 -
zoj2818 Root of the Problem 简单数学 开方
Root of the Problem Time Limit: 2 Seconds Memory Limit: 65536 KB Given positive integers B and N, find an integer A such that AN is as close as possible to B. (The result A is an approx原创 2017-08-13 17:53:36 · 257 阅读 · 0 评论 -
1248 寒冰王座 换个思维来解决这个背包题目
顺便练习下STL和二分 HDU1248 #include #include #include #include #include #include #include #include #include using namespace std; setq; bool M[10010]; int a[200],L=0; int main() { int i,j,T,n; q.insert原创 2017-09-27 20:57:17 · 283 阅读 · 0 评论