Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

腾讯:64匹马,8个赛道,找出跑最快的4匹马 #125

Open
sisterAn opened this issue Nov 5, 2020 · 3 comments
Open

腾讯:64匹马,8个赛道,找出跑最快的4匹马 #125

sisterAn opened this issue Nov 5, 2020 · 3 comments
Labels

Comments

@sisterAn
Copy link
Owner

sisterAn commented Nov 5, 2020

64匹马,每一只马的跑步速度是恒定的,不会因为多跑几轮就会速度下降,没有提供秒表进行记录。问需要比赛多少轮才能得出最快的4匹马?

@sisterAn sisterAn added the 腾讯 label Nov 5, 2020
@sisterAn sisterAn changed the title 腾讯:100匹马,4个赛道,找出跑最快的4匹马 腾讯:64匹马,8个赛道,找出跑最快的4匹马 Nov 8, 2020
@sisterAn
Copy link
Owner Author

sisterAn commented Nov 9, 2020

step1

分8组,各跑一轮,依成绩组内编号

step 2

各组1号跑一轮,依成绩编号。此时共跑9轮选出最快马

如图,A1是最快马

step 3


此时,仅仅需要在红线区域内(9匹马)中决出前3匹既可,至少需要跑2次

结果

8+1+2=11

@forgetallthing
Copy link

100马的有答案吗

@imgss
Copy link

imgss commented Apr 1, 2021

第九轮不但选出最快的马,也淘汰最后四名所在的4组,A>B>C>D>(E>F>G>H)(淘汰),所以才从黄色区域选出剩下的三匹马

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants