05·07 An IQ question

jazz 发表于 2007-05-07 15:03:32

The question is:

Four men crossing the bridge
    Four men travelling together arrive at a bridge after dark and wish to cross.   The bridge is narrow and they decide that they must use a flashlight to cross.  They have a single flashlight.  Unfortunately, the bridge will only stand the weight of two men at a time.  A crossing party, either 1 or 2 people, must have the flashlight with them.  The flashlight can be walked back and forth, but it cannot be thrown.  Each man walks at a different speed, and any pair crossing must cross at the slower man's pace. The four different men can cross (one way) in the following time:
1 minute
2 minutes
5 minutes
10 minutes
Can all men cross in 17 minutes?  What is the minimum time needed for all four men to cross the bridge?  How would you prove that?

This question is quite tricky.  I saw it from internet. It was an interview question. Actually, all men can cross within 17 minutes. The strategy is like this:
    Notate 1minute A, 2 minutes B, 5 minutes C and 10minutes D.
    Now, first, A and B cross the bridge and it costs 2 minutes. Then, A crosses back, and it costs 1 minutes. And C and D cross the bridge and it costs 10 minutes and now the total time is 13 minutes. At this moment, B crosses back and then come back with A and it costs 4 minutes as a whole. So the total time interval is 17 minutes.

Another question is about C/C++ is :
    print the interger from 1 to 1000 without using 'for' or 'while' and so on, neither using recursive.
关键词(Tag): iq 智力题 面试相关


收藏: QQ书签 del.icio.us 订阅: Google 抓虾

最新评论

发表评论

* 昵称

已经注册过? 请登录

新用户请先注册 以便能显示头像及追踪评论回复

Email
网址
* 评论
表情
 
 

分类小组论坛
杂谈, 娱乐、八卦, 文学、艺术, 体育, 旅游、同城, 象牙塔, 情感, 时尚、生活, 星座, 科技

请注意遵守中华人民共和国法律法规, 如威胁到本站生存, 将依法向有关部门报告, 同时本站的相关记录可能成为对您不利的证据.

相关法律法规
全国人大常委会关于维护互联网安全的决定
中华人民共和国计算机信息系统安全保护条例
中华人民共和国计算机信息网络国际联网管理暂行规定
计算机信息网络国际联网安全保护管理办法
计算机信息系统国际联网保密管理规定