codeforces B. Design Tutorial: Learn from Life

简介:

 题意:有一个电梯,每一个人都想乘电梯到达自己想要到达的楼层!
从a层到b层的时间是|a-b|, 乘客上下电梯的时间忽略不计!问最少
需要多少的时间.... 
    这是一道神题啊,自己的思路不知不觉的就按照注解的思路走了,想着
用优先队列模拟一下,可能还是没有模拟好吧,一直哇!但是同学的
优先队列模拟过了! 没想到是greedy算法简单的几行就解决了!

  View Code









本文转自 小眼儿 博客园博客,原文链接:http://www.cnblogs.com/hujunzheng/p/4000012.html,如需转载请自行联系原作者
目录
相关文章
|
安全 内存技术
读书笔记系列 - Operating Systems: Three Easy Pieces - Intro
读书笔记系列 - Operating Systems: Three Easy Pieces - Intro
109 0
Design Tutorial: Learn from Math
Design Tutorial: Learn from Math
77 0
Design Tutorial: Learn from Math
|
安全 Linux Docker
A Brief Introduction to LinuxKit
The LinuxKit makes it possible for users to utilize the container platform with secure, lean, and portable Linux subsystems.
1289 0
A Brief Introduction to LinuxKit
|
Shell PHP 开发工具
|
Shell PHP 开发工具
|
Ubuntu Linux Unix