贪心
文章平均质量分 88
D.Fu
试问岭南应不好,却道此心安处是吾乡
展开
-
vacation ——————hdu codeforces 986a
Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of this n days: whether that gym opened and whether a contest was c...原创 2018-08-02 21:20:34 · 141 阅读 · 0 评论 -
poj 1456 并查集&贪心
题意是,告诉你每个货物的利润和截止日期,让你求在最后一件货物过期前的最大利润。 分析:要想求最大利润,那么每一时间单位都只需要卖出最大利润的货物就可以,如果冲突,就是要并查集来快速查找上一个不矛盾点,来放置。 代码: #include<stdio.h> #include<algorithm> #include<stdlib.h> #include<...原创 2019-02-28 22:17:58 · 129 阅读 · 0 评论