Help to solve. I need script of course. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 27

Help to solve. I need script of course.

You have 25 horses, what is the minimum number of races you can find the top 3. In one race you can race 5 horses, and you don't have a timer.

6th Jan 2018, 3:19 PM
\__(° = °)__/
4 Answers
+ 2
answer from@ace and@zapata is not correct here my approach after 5 race between 25 horses here is summary in race A , all are lined up as 12345 winner is A1 in race B , all are lined up as 12345 , winner is B1 similarly from all cases we got 5 top racer from 5 races , who are A1 B1 C1 D1 E1 ABCDE 11111 22222 33333 44444 55555 in race A player named as A1 A2...... in race B player named as B1 B2.... . . in race E player named as E1 E2 .... then run a race among the winners(between A1 B1 C1 D1 E1 ) , you will get your no. 1racer ( let you got C1) , total races = 6 then race between A1 B1 C2 D1 E1 , you will get your no. 2 racer (let be C2), total races = 7 [ .... and now here you are wrong @ACE you simply can't judge the position of 2nd & 3rd racer from 7th race because let suppose in my 7th race winner is C2 and runner up is A1 so according to you , your top 3 racer are C1 C2 and A1 and what if C3 has better timing than A1 , as we don't know cuz C3 has don't even participate in race 7th race ..... ] then race between A1 B1 C3 D1 E1 , you will get your no. 3 racer ( let be D1) , total races = 8 HENCE MINIMUM REQUIRED RACES IS. 8 @ 4 rotender , buddy I'm completely from different field , so sorry i can't suggest you programming algorithm for this hope I'm right, and you get your answer nice reasoning 😍😍
6th Jan 2018, 8:50 PM
Hack Erer
Hack Erer - avatar
+ 2
@ace I'm also bit sure I'm right consider this I'm gonna use a timer here 5 races named A B C D E are here *() any amount of time , it doesn't matter 6th races in between a1 b1 c1 d1 e1 7th races ib between a1 b1 c2 d1 e1 8th races in between. a1 b1 c3 d1 e1 A. B. C. D. E. a1(7.1s) b1(4.1s). c1(3s) d1(4s). e1(5s) a2(6s). b2(7s). c2(3.2s) d2(9s) e2(10s) a3(11s) b3(12s). c3(3.3s) d3(14) e3(15s) a4(). b4(). c4(). d4(). e4() a5(). b5(). c5(). d5(). e5() so according to this top 3 must be c1 , c2 , c3 and if I'm not wrong according to you , using your algorithm top 3 are c1, c2 , d1 why are answer coming different correct me if I'm wrong 😮😮😫😫??
7th Jan 2018, 6:56 AM
Hack Erer
Hack Erer - avatar
+ 2
I'm not gonna further argue but sorry to say explanation you provide on web also wrong aarshi out....... .
7th Jan 2018, 2:13 PM
Hack Erer
Hack Erer - avatar
+ 1
I'm not sure about this but, if I guess the horses have the same time result in all the races. I have the 15 faster horses in 5 races. Then I have the 9 faster horses in 3 races. Then I have 6 faster horses in 2 races. (Then I put 5 in a race and the (sixth? I don't know how it is written xD) will pass by default.) I'll have the 4 more faster horses in one race. Then I'll do the last race with the 4 horses. The sum gave me 12 races
6th Jan 2018, 3:34 PM
Sebastián Zapata
Sebastián Zapata - avatar