z***t 发帖数: 10817 | 1 【 以下文字转载自 Military 讨论区 】
发信人: tgbyhn (CNN), 信区: Military
标 题: Amazon面试智力题
发信站: BBS 未名空间站 (Thu Apr 29 08:19:30 2010, 美东)
There are 25 horses among which you need to find out the fastest 3 horses.
You can conduct race among at most 5 to find out their relative speed. At no
point you can find out the actual speed of the horse in a race. Find out
how many races are required to get the top 3 horses. | t********n 发帖数: 705 | 2 I don't know the least number it require, but the most it require is 10
5 - 5 horses race, took the top 3 of each group,--> 15 horses left
3 - 5 horses race, took the top 3 of each group,--> 6 horses left
1 - 5 horses race, took the top 3 of each group,--> 4 horses left
1 - 4 hourse rack, took the top 3
5+3+1+1 = 10
no
【在 z***t 的大作中提到】 : 【 以下文字转载自 Military 讨论区 】 : 发信人: tgbyhn (CNN), 信区: Military : 标 题: Amazon面试智力题 : 发信站: BBS 未名空间站 (Thu Apr 29 08:19:30 2010, 美东) : There are 25 horses among which you need to find out the fastest 3 horses. : You can conduct race among at most 5 to find out their relative speed. At no : point you can find out the actual speed of the horse in a race. Find out : how many races are required to get the top 3 horses.
| C*****3 发帖数: 4215 | | z***t 发帖数: 10817 | 4
再想想
【在 t********n 的大作中提到】 : I don't know the least number it require, but the most it require is 10 : 5 - 5 horses race, took the top 3 of each group,--> 15 horses left : 3 - 5 horses race, took the top 3 of each group,--> 6 horses left : 1 - 5 horses race, took the top 3 of each group,--> 4 horses left : 1 - 4 hourse rack, took the top 3 : 5+3+1+1 = 10 : : no
| z***t 发帖数: 10817 | 5
什么玉米 发一份
【在 C*****3 的大作中提到】 : 这个跟google那个玉米题不是大同小异?
| C*****3 发帖数: 4215 | | z***t 发帖数: 10817 | 7
我自己找了找
google key word:
“玉米题 google”
居然第一个结果是43sec前你发的这个帖子
【在 C*****3 的大作中提到】 : 好, 等我考完试着给你
| t********n 发帖数: 705 | 8 oh..type the wrong number on second line...the most is 12
I don't know the least number it require, but the most it require is 12
5 - 5 horses race, took the top 3 of each group,--> 15 horses left
3 - 5 horses race, took the top 3 of each group,--> 9 horses left
2 - 5 horses race, took the top 3 of each group,--> 6 horses left
1 - 5 horses race, took the top 3 of each group,--> 4 horses left
1 - 4 horses race, took the top 3 ,--> end
5+3+2+1+1 = 12 | z***t 发帖数: 10817 | 9
越来越远了
你去军版看看原帖我的答案吧 呵
【在 t********n 的大作中提到】 : oh..type the wrong number on second line...the most is 12 : I don't know the least number it require, but the most it require is 12 : 5 - 5 horses race, took the top 3 of each group,--> 15 horses left : 3 - 5 horses race, took the top 3 of each group,--> 9 horses left : 2 - 5 horses race, took the top 3 of each group,--> 6 horses left : 1 - 5 horses race, took the top 3 of each group,--> 4 horses left : 1 - 4 horses race, took the top 3 ,--> end : 5+3+2+1+1 = 12
| b*****s 发帖数: 11267 | 10 在你基础上稍微改下就可以了
round 1: 5 - 5 horses race, took the top 1 of each group--> 5 horses left
round 2: 1 - 5 horses race, took the top 1->choose the fastest one
round 3: 1 - 1 horses race, 2 from the round2's top2 and top3,2 from fastest
one's group's top2 &top3,1 from round2's top2's round1's group's top2-choose the
rest 2
【在 t********n 的大作中提到】 : I don't know the least number it require, but the most it require is 10 : 5 - 5 horses race, took the top 3 of each group,--> 15 horses left : 3 - 5 horses race, took the top 3 of each group,--> 6 horses left : 1 - 5 horses race, took the top 3 of each group,--> 4 horses left : 1 - 4 hourse rack, took the top 3 : 5+3+1+1 = 10 : : no
| | | G*****o 发帖数: 1341 | | z***t 发帖数: 10817 | 12
bingo
【在 G*****o 的大作中提到】 : 7
| b*****s 发帖数: 11267 | 13 自从学了game theory
我现在觉得这种题目就是在侮辱我的智商
【在 z***t 的大作中提到】 : : bingo
| l****a 发帖数: 352 | 14 round 3 不对
fastest
【在 b*****s 的大作中提到】 : 在你基础上稍微改下就可以了 : round 1: 5 - 5 horses race, took the top 1 of each group--> 5 horses left : round 2: 1 - 5 horses race, took the top 1->choose the fastest one : round 3: 1 - 1 horses race, 2 from the round2's top2 and top3,2 from fastest : one's group's top2 &top3,1 from round2's top2's round1's group's top2-choose the : rest 2
| l****a 发帖数: 352 | 15 居然不说话了,要坚持己见啊
【在 l****a 的大作中提到】 : round 3 不对 : : fastest
| d******r 发帖数: 865 | | b*****s 发帖数: 11267 | 17 对,还应该吧第二轮跑第二的那组的第二名也加上
【在 l****a 的大作中提到】 : round 3 不对 : : fastest
| t****u 发帖数: 836 | 18 7
第一轮5组全跑,挑出5个每组最快的跑,跑第一的直接晋级;
后三组中除了最快的其它14个全淘汰。
前面第一第二的组里分别再取23,12;和第三快的组里的1,再跑一次取前二。 | i*********s 发帖数: 8706 | 19 并没有guarantee最快的马每次都跑最快
快马第一轮溜达在最后。。。慢马超水平发挥两轮然后就不行了。。。
no
【在 z***t 的大作中提到】 : : bingo
|
|