由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 求问个DP的题
相关主题
再问个C programming考试的题目关于配偶的 Insurance coverage (转载)
问个小公司base的问题BB电面
[合集] 我也贡献一点点感想(下)学位还没有拿到, 可否申请OPT延期
Bloomberg(在线等)h1b transfer approval之后,
贴点面试题这个contractor offer是不是太差了? 值得先接下来再骑驴找马么?
Interview Questions for an investment bank一直没有很好理解thread join itself,哪位解惑一下
bloomberg onsite报面经求bless公司relocation的钱可以不还吗
你们辞职的时候会告诉你的去向吗?please help for an Unix shell problem
相关话题的讨论汇总
话题: bus话题: students话题: your话题: exit话题: soda
进入JobHunting版参与讨论
1 (共1页)
c**i
发帖数: 306
1
You are driving a bus along a highway, full of rowdy, hyper, thirsty
students and a soda fountain
machine. Each minute that a student is on your bus, that student drinks one
ounce of soda. Your
goal is to drop the students off quickly, so that the total amount of soda
consumed by all students
is as small as possible.
You know how many students will get off of the bus at each exit. Your bus
begins somewhere
along the highway (probably not at either end) and move s at a constant
speed of 37.4 miles per
hour. You must drive the bus along the highway; however, you may drive
forward to one exit then
backward to an exit in the opposite direction, switching as often as you
like. (You can stop the
bus, drop off students, and turn around instantaneously.)
Describe an efficient algorithm to drop the students off so that they drink
as little soda as
possible. Your input consists of the bus route (a list of the exits,
together with the travel time
between successive exits), the number of students you will drop off at each
exit, and the current
location of your bus (which you may assume is an exit).
求大牛们share个思路,thanks
e********2
发帖数: 495
2
作业题吧?哥给你个提示,2D-DP,类似于edit distance。

one

【在 c**i 的大作中提到】
: You are driving a bus along a highway, full of rowdy, hyper, thirsty
: students and a soda fountain
: machine. Each minute that a student is on your bus, that student drinks one
: ounce of soda. Your
: goal is to drop the students off quickly, so that the total amount of soda
: consumed by all students
: is as small as possible.
: You know how many students will get off of the bus at each exit. Your bus
: begins somewhere
: along the highway (probably not at either end) and move s at a constant

c**i
发帖数: 306
3

不是作业,一个面试题:http://www.careercup.com/question?id=5690555409367040
可否细说下DP记录的是什么信息?还是有点晕

【在 e********2 的大作中提到】
: 作业题吧?哥给你个提示,2D-DP,类似于edit distance。
:
: one

1 (共1页)
进入JobHunting版参与讨论
相关主题
please help for an Unix shell problem贴点面试题
Onsite归来 求BlessInterview Questions for an investment bank
EPI (Elements of Programming Interviews) 要看多少?bloomberg onsite报面经求bless
citi brainteaser你们辞职的时候会告诉你的去向吗?
再问个C programming考试的题目关于配偶的 Insurance coverage (转载)
问个小公司base的问题BB电面
[合集] 我也贡献一点点感想(下)学位还没有拿到, 可否申请OPT延期
Bloomberg(在线等)h1b transfer approval之后,
相关话题的讨论汇总
话题: bus话题: students话题: your话题: exit话题: soda