2013年8月15日

8月14号的练习:HDU 1789&&HDU 1846&&HDU 1527&&POJ 1844&&HDU 1142

摘要: Doing Homework againHDU 1789可以用贪心做(网上搜了发现都是用贪心,DP就这么难???)思路:the reduced scores.从大到小排序,(相同就把the deadlines of the subjects从小到大排序)这里可保证耗分数最多的给完成,留下的分数最低。其实这贪心很容易想到。但最坑的是!只给出一个N,我还以为the deadlines of the subjects就在这里取呢!(1~N)之后才发现天数和所扣的分数未知!幸好这个天数就在1000左右,如果在大点肯定超时! 1 #include 2 #include 3 #include 4 #inc 阅读全文
posted @ 2013-08-15 15:08 ~~碾压机 阅读(172) 评论(0) 推荐(0) 编辑