随笔分类 -  贪心法

I - Doing Homework again
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1789 题意:就是你每次完成一门功课都要花一天的时间,问你怎样安排完成作业的顺序能让你被扣的分数最少。竟然是贪心。。。。。。。。。 分析:开始的思路是先按照所扣分数的多少排序,然后就没有下文了。。。。。。 阅读全文

posted @ 2016-07-24 19:22 踮起脚望天 阅读(200) 评论(0) 推荐(0)

J~今年暑假不AC
摘要:#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef struct st { int begin; int end; }st; bool cmp(s 阅读全文

posted @ 2016-07-22 18:32 踮起脚望天 阅读(233) 评论(0) 推荐(0)

K - Hero
摘要:Description When playing DotA with god-like rivals and pig-like team members, you have to face an embarrassing situation: All your teammates are kille 阅读全文

posted @ 2016-07-18 20:51 踮起脚望天 阅读(138) 评论(0) 推荐(0)