Problem G
2016-03-15 21:00
316 查看
The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 seconds
to move down one floor. The elevator will stay for 5 seconds at each stop.
For a given request list, you are to compute the total time spent to fulfill the requests on the list. The elevator is on the 0th floor at the beginning and does not have to return to the ground floor when the requests are fulfilled.
这次的题是非常简单的,唯一注意的就是当楼层数一样的话,就多等5秒。
to move down one floor. The elevator will stay for 5 seconds at each stop.
For a given request list, you are to compute the total time spent to fulfill the requests on the list. The elevator is on the 0th floor at the beginning and does not have to return to the ground floor when the requests are fulfilled.
这次的题是非常简单的,唯一注意的就是当楼层数一样的话,就多等5秒。
相关文章推荐
- 将项目设置为MRC
- 有头节点单向循环链表
- Linux主从复制
- HDU 5066 Harry And Physical Teacher(数学)
- sqoop导出mysql数据进入hive错误
- Qt中多线程的一种使用
- 多源最短路径问题-floyd warshall
- poj 1328 Radar Installation
- Android源代码分析之Framework的MediaPlayer
- iOS 自定义对象转NSDictionary
- mysql优化
- sqoop导出mysql数据进入hive错误
- 乐观锁和悲观所
- lstm的debug模式下编译不行貌似
- Go语言核心之美 1.5-作用域
- CodeForces 526A-King of Thieves
- 通过CAGradientLayer制作渐变色效果(转)
- poj-1012-约瑟夫问题
- 【SPL标准库专题(3)】 Classes
- squid 启动报错