随笔分类 -  贪心算法

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 ... 阅读全文
posted @ 2018-04-26 11:35 zitian246 阅读(133) 评论(0) 推荐(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 fi... 阅读全文
posted @ 2017-10-10 13:42 zitian246 阅读(121) 评论(0) 推荐(0)
FZU-Problem 2191 完美的数字
摘要:Bob是个很喜欢数字的孩子,现在他正在研究一个与数字相关的题目,我们知道一个数字的完美度是 把这个数字分解成三个整数相乘A*A*B(0int main(){ __int64 a,b; while(~scanf("%I64d %I64d",&a,&b)) ... 阅读全文
posted @ 2017-06-05 19:19 zitian246 阅读(126) 评论(0) 推荐(0)
NYOJ12 喷水装置(二)
摘要:描述有一块草坪,横向长w,纵向长为h,在它的橫向中心线上不同位置处装有n(n#includeusing namespace std;#include#includestruct note{ double xi,ri;} q[10050];struct doll{... 阅读全文
posted @ 2017-04-15 16:47 zitian246 阅读(133) 评论(0) 推荐(0)