文件名称:111
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
现在大家正在为完成网络教室的题目而奋斗。你想获得更高的分数,但发现自己的效率有点儿低,于是请你写个程序计算一下:
假设一共有 n 个题目,每个题目 i 你都需要一个单位时间来完成。同时每个题目 i 都有一个完成期限 di 和相应的分数 pi 。这里的完成期限是指应在开始时间之后 di 个时间单位内(含di)完成,不能迟交。
所有题目同时开始计时,当且仅当题目 i 在它的期限截止以前被完成时,你才能获得 pi 的分数。完成期限的设定使得你不一定能将所有的题目全都按时完成。因此只有合理安排做题的顺序,才能在有限的时间内获得最高的分数。
问:在这种条件下,你能够得到的最高的分数是多少?
Input
第一行输入题目的总个数 n <= 10000
第二行输入各个题目的分数 0 < pi <= 100
第三行输入每一个题目的完成期限 0 < di <=10000
Output
输出最高的分数。-Now everyone is subject to the completion of the network classroom struggle. You want to get a higher score, but found himself a little low efficiency, so you write a program to calculate this: Suppose there are n a topic, each topic i you need a unit of time to complete. And each topic i have a completion deadline and corresponding score di pi. Here deadlines means you should start time after di time units within (including di) complete, not late. All topics in start time, if and only if the subject i at its deadline had previously been completed, you can get pi scores. Setting deadlines so you do not have all the questions can all be completed on time. Thus only reasonable arrangements do question the order, to get the highest score in a limited time. Q: In this condition, you can get the highest score is the number? Input The first line of input total number of topics n < = 10000 the second line of the input of each subject score 0 < pi < = 100 the third line of the input of
假设一共有 n 个题目,每个题目 i 你都需要一个单位时间来完成。同时每个题目 i 都有一个完成期限 di 和相应的分数 pi 。这里的完成期限是指应在开始时间之后 di 个时间单位内(含di)完成,不能迟交。
所有题目同时开始计时,当且仅当题目 i 在它的期限截止以前被完成时,你才能获得 pi 的分数。完成期限的设定使得你不一定能将所有的题目全都按时完成。因此只有合理安排做题的顺序,才能在有限的时间内获得最高的分数。
问:在这种条件下,你能够得到的最高的分数是多少?
Input
第一行输入题目的总个数 n <= 10000
第二行输入各个题目的分数 0 < pi <= 100
第三行输入每一个题目的完成期限 0 < di <=10000
Output
输出最高的分数。-Now everyone is subject to the completion of the network classroom struggle. You want to get a higher score, but found himself a little low efficiency, so you write a program to calculate this: Suppose there are n a topic, each topic i you need a unit of time to complete. And each topic i have a completion deadline and corresponding score di pi. Here deadlines means you should start time after di time units within (including di) complete, not late. All topics in start time, if and only if the subject i at its deadline had previously been completed, you can get pi scores. Setting deadlines so you do not have all the questions can all be completed on time. Thus only reasonable arrangements do question the order, to get the highest score in a limited time. Q: In this condition, you can get the highest score is the number? Input The first line of input total number of topics n < = 10000 the second line of the input of each subject score 0 < pi < = 100 the third line of the input of
(系统自动生成,下载前可以参看下载内容)
下载文件列表
求两点之间的最短路径.cpp
贪婪的你.cpp