文件名称:tl
- 所属分类:
- 其他小程序
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2014-11-23
- 文件大小:
- 672kb
- 下载次数:
- 0次
- 提 供 者:
- y*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
现在大家正在为完成网络教室的题目而奋斗。你想获得更高的分数,但发现自己的效率有点儿低,于是请你写个程序计算一下:
假设一共有 n 个题目,每个题目 i 你都需要一个单位时间来完成。同时每个题目 i 都有一个完成期限 di 和相应的分数 pi 。这里的完成期限是指应在开始时间之后 di 个时间单位内(含di)完成,不能迟交。
所有题目同时开始计时,当且仅当题目 i 在它的期限截止以前被完成时,你才能获得 pi 的分数。完成期限的设定使得你不一定能将所有的题目全都按时完成。因此只有合理安排做题的顺序,才能在有限的时间内获得最高的分数。
问:在这种条件下,你能够得到的最高的分数是多少?
Input
第一行输入题目的总个数 n <= 10000
第二行输入各个题目的分数 0 < pi <= 100
第三行输入每一个题目的完成期限 0 < di <=10000
Output
输出最高的分数。-Now we are to complete the network classroom topics and struggle. You want to get a higher score, but finds himself a little low efficiency, so you write a program to calculate it: Assuming a total of n topics, each topic i need a unit of time you have to complete. And each topic i have a completion date and the corresponding fraction di pi. Here deadlines means should be made after the start time di time units within (including di) is completed, not late. All topics while starting time, if and only if the subject i when it is completed before the deadline, you can get pi score. Deadlines are set so you do not have all the questions can all be completed on time. Therefore, only the title of the order made reasonable arrangements to get the highest score in a limited time. Q: In this condition, you can get the highest score is the number? The total number of Input The first line of input topic n < = 10000 second line input for each subject score 0 < pi < = 100 the third line of
假设一共有 n 个题目,每个题目 i 你都需要一个单位时间来完成。同时每个题目 i 都有一个完成期限 di 和相应的分数 pi 。这里的完成期限是指应在开始时间之后 di 个时间单位内(含di)完成,不能迟交。
所有题目同时开始计时,当且仅当题目 i 在它的期限截止以前被完成时,你才能获得 pi 的分数。完成期限的设定使得你不一定能将所有的题目全都按时完成。因此只有合理安排做题的顺序,才能在有限的时间内获得最高的分数。
问:在这种条件下,你能够得到的最高的分数是多少?
Input
第一行输入题目的总个数 n <= 10000
第二行输入各个题目的分数 0 < pi <= 100
第三行输入每一个题目的完成期限 0 < di <=10000
Output
输出最高的分数。-Now we are to complete the network classroom topics and struggle. You want to get a higher score, but finds himself a little low efficiency, so you write a program to calculate it: Assuming a total of n topics, each topic i need a unit of time you have to complete. And each topic i have a completion date and the corresponding fraction di pi. Here deadlines means should be made after the start time di time units within (including di) is completed, not late. All topics while starting time, if and only if the subject i when it is completed before the deadline, you can get pi score. Deadlines are set so you do not have all the questions can all be completed on time. Therefore, only the title of the order made reasonable arrangements to get the highest score in a limited time. Q: In this condition, you can get the highest score is the number? The total number of Input The first line of input topic n < = 10000 second line input for each subject score 0 < pi < = 100 the third line of
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Debug\贪婪的你.exe
.....\贪婪的你.ilk
.....\贪婪的你.pdb
ipch\贪婪的你-20e2db6\贪婪的你-92340084.ipch
贪婪的你\Debug\CL.read.1.tlog
........\.....\CL.write.1.tlog
........\.....\link-cvtres.read.1.tlog
........\.....\link-cvtres.write.1.tlog
........\.....\link.15568-cvtres.read.1.tlog
........\.....\link.15568-cvtres.write.1.tlog
........\.....\link.15568.read.1.tlog
........\.....\link.15568.write.1.tlog
........\.....\link.read.1.tlog
........\.....\link.write.1.tlog
........\.....\mt.read.1.tlog
........\.....\mt.write.1.tlog
........\.....\rc.read.1.tlog
........\.....\rc.write.1.tlog
........\.....\vc100.idb
........\.....\vc100.pdb
........\.....\贪婪的你.exe.embed.manifest
........\.....\贪婪的你.exe.embed.manifest.res
........\.....\贪婪的你.exe.intermediate.manifest
........\.....\贪婪的你.lastbuildstate
........\.....\贪婪的你.log
........\.....\贪婪的你.obj
........\.....\贪婪的你.write.1.tlog
........\.....\贪婪的你_manifest.rc
........\贪婪的你.cpp
........\贪婪的你.vcxproj
........\贪婪的你.vcxproj.filters
........\贪婪的你.vcxproj.user
贪婪的你.sdf
贪婪的你.sln
ipch\贪婪的你-20e2db6
贪婪的你\Debug
Debug
ipch
贪婪的你