Q: 25匹马,请找出最快的3匹。
一次只能赛5匹,只能知道这5匹马的排序,没有秒表。
力求用最少的操作。
A: divide 25 horses to 5 groups, i.e., a, b, c, d, e
5 runs determines the order in each group, i.e.
a1>a2>a3>a4>a5
b1>b2>b3>b4>b5
c1>c2>c3>c4>c5
d1>d2>d3>d4>d5
e1>e2>e3>e4>e5
assume 6th run's result is a1>b1>c1>d1>e1,
a1 will be the fastest horse
7th run with b1, c1, b2, a2, a3 will determine the second and third fastest horses.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment