CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 Windows编程

文件名称:111

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2015-12-20
  • 文件大小:
    1.62kb
  • 已下载:
    0次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容来自于网络,使用问题请自行百度

现在大家正在为完成网络教室的题目而奋斗。你想获得更高的分数,但发现自己的效率有点儿低,于是请你写个程序计算一下:



  假设一共有 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

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com