- 1、本文档共4页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
解题报告:Phone numbers
题目来源:POJ 1744, /JudgeOnline/showproblem?problem_id=1744
解法或类型: 二分 + 谈心
作者:张志强
Elevator Stopping Plan
Time Limit:1S? Memory Limit:65536KTotal Submit:414 Accepted:77
Description
ZSoft Corp. is a software company in GaoKe Hall. And the workers in the hall are very hard-working. But the elevator in that hall always drives them crazy. Why? Because there is only one elevator in GaoKe Hall, while there are hundreds of companies in it. Every morning, people must waste a lot of time waiting for the elevator.Hal, a smart guy in ZSoft, wants to change this situation. He wants to find a way to make the elevator work more effectively. But its not an easy job. There are H floors in GaoKe Hall. It takes 4 seconds for the elevator to raise one floor. It seconds if the elevator goes from the 1 st floor to the?means:It costs (n-1)*4 nth floor without stop. And the elevator stops 10 second once. So, if the seconds (It is not?elevator stops at each floor, it will cost (n-1)*4+(n-2)*10 necessary to calculate the stopping time at nth floor). In another way, it takes seconds?20 seconds for the workers to go up or down one floor. It takes (n-1)*20 for them to walk from the 1 st floor to the nth floor. Obviously, it is not a good idea. So some people choose to use the elevator to get a floor which is the nearest to their office. After thinking over for a long time, Hal finally found a way to improve this situation. He told the elevator man his idea: First, the elevator man asks the people which floors they want to go. He will then design a stopping plan which minimize the time the last person need to arrive the floor where his office locates. For example, if the elevator is required to stop at the 4 th , 5 th and 10 th floor, the stopping plan would be: the elevator stops at 4 th and 10 th floor. Because the elevator will arrive 4 th second, then it will stop 10 seconds, then it will arrive 10 th?floor at 3*4=12 second. People who want to go 4 th floor will reach t
您可能关注的文档
- 国际竞赛ACM北大教程经典例题1674 Sorting by Swapping.doc
- 国际竞赛ACM北大教程经典例题1677 Girls' Day.doc
- 国际竞赛ACM北大教程经典例题1678 I Love this Game 解题报告.doc
- 国际竞赛ACM北大教程经典例题1679 The Unique MST.doc
- 国际竞赛ACM北大教程经典例题1680《Fork() Makes Trouble》.doc
- 国际竞赛ACM北大教程经典例题1681 Painter's Problem.doc
- 国际竞赛ACM北大教程经典例题1687 LiHaoyuan Buggy Sat.doc
- 国际竞赛ACM北大教程经典例题1689-3002Rubbery.doc
- 国际竞赛ACM北大教程经典例题1691 -- Painting A Board.doc
- 国际竞赛ACM北大教程经典例题1692 LiHaoyuan Crossed Matchings.doc
- 人教部编版六年级语文下册3.古诗三首(教案).docx
- 二年级下册美术教案- 第15课 做笔筒 ▏人美版.docx
- 我们身边的线条(教案)2023-2024学年美术一年级下册.docx
- 二年级上册美术教学设计第8课 随形联想——石头的联想|沪教版 .docx
- 六年级下册心理健康教育教学设计-10我爱母校 | 辽大版.docx
- 三年级下册美术教案-第一课 水墨游戏 ︳人教版.docx
- 部编版语文二年级上册第5课《玲玲的画》(教学设计).docx
- 五年级数学下册教案- 蒜叶的生长 苏教版.docx
- 除法的初步认识(教案)-二年级下册数学人教版.docx
- 第10课 美丽的花 第二课时(教学设计)人教版(2012)美术三年级上册.docx
文档评论(0)