摘要: 简单描述一下题意:有n个topic需要在长度为L的讲座若干个中讲完,每个topic耗费时间为ti, topic必须按顺序讲否则学生听不懂,这样每次讲座会剩余一些时间,最好在10分钟以内,讲座的不满意指数计算如下: DI = -c (110) 0 (t=0)t为讲座剩余时间,讲座不能超出时间。要求输出最少要多少个讲座和在相同讲座下最小的DI。1 2 #include 3 #include 4 #define maxn 1010 5 using namespace std; 6 7 int n, l, c, t[maxn], sum[maxn], c... 阅读全文
posted @ 2013-10-14 21:58 张小豪 阅读(260) 评论(0) 推荐(0) 编辑