
贪心
kaisa158
HIT、机器学习
展开
-
hdu 1257 最少拦截系统(贪心)(简单)
思想: 贪心,构建模型,求解。原创 2015-07-27 14:32:48 · 520 阅读 · 0 评论 -
hdu 1051 Wooden Sticks(贪心)
思路: 复习基础题了。先按L由小到大排序,若L相等按照W由小到大排序W。贪心求解。原创 2015-07-16 13:44:40 · 441 阅读 · 0 评论 -
hdu 1969 Pie(贪心+二分查找)(简单)
题意: 生日家里来了F个朋友,他家里有好N个Pie,主人希望把Pie分出F+1份(自己也要一个),要求体积相同,所有的Pie不需要都分完,问你每个人最大能分到多大体积的Pie。 思路: 贪心+二分查找原创 2015-07-16 14:55:08 · 1545 阅读 · 0 评论 -
poj 1716 Integer Intervals(差分约束||贪心)(中等)
思路: 这题贪心和差分约束都可以,在poj上交wa了6变,不是我的问题,是系统傻逼。。。差分约束题要写出自己的风格最好原创 2015-07-30 17:21:36 · 669 阅读 · 0 评论 -
bzoj 2151 种树(贪心+堆)(经典)
思路: 看到题,第一反应就是搜索,学了一年,还太水。。看了大神的博客。如下: 分析: 首先考虑如果没有“相邻位置不能都种”这一限制会怎么样。这时就是一个裸的贪心——按照A[i]从大到小排序,然后取前M个。 那么加上限制以后会发生什么呢?原创 2015-07-20 14:47:36 · 2945 阅读 · 0 评论 -
( 贪心/并查集)Codeforces Round #480 (Div. 2) C. Posterized
C. Posterizedtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputProfessor Ibrahim has prepared the final homework for his algorithm’s class. He asked ...原创 2018-05-28 17:40:25 · 272 阅读 · 0 评论