![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心算法
zitian246
左耳靠近心脏,甜言蜜语要说给左耳听。
展开
-
NYOJ12 喷水装置(二)
描述 有一块草坪,横向长w,纵向长为h,在它的橫向中心线上不同位置处装有n(n<=10000)个点状的喷水装置,每个喷水装置i喷水的效果是让以它为中心半径为Ri的圆都被润湿。请在给出的喷水装置中选择尽量少的喷水装置,把整个草坪全部润湿。 输入第一行输入一个正整数N表示共有n次测试数据。 每一组测试数据的第一行有三个整数n,w,h,n表示共有n个喷水装置,w表示草坪的横向长度,原创 2017-04-15 16:47:29 · 360 阅读 · 0 评论 -
FZU-Problem 2191 完美的数字
Bob是个很喜欢数字的孩子,现在他正在研究一个与数字相关的题目,我们知道一个数字的完美度是 把这个数字分解成三个整数相乘A*A*B(0 S,S表示的是从a到b的所有数字的流行度之和,即S=d(a)+d(a+1)+…+d(b)。 Input原创 2017-06-05 19:19:00 · 303 阅读 · 0 评论 -
HDU - 1260 Tickets (简单DP)
Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go back home as early as原创 2017-10-10 13:42:27 · 178 阅读 · 0 评论 -
POJ - 1456-Supermarket (并查集+贪心)两种代码实现
A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the moment the s...原创 2018-04-26 11:34:33 · 851 阅读 · 4 评论