ICPC Preparatory Series by Team Forthewatch Mirror contest : Expetcted value problem !

Hey ! Can anyone share his solution or approach in detail .
https://www.codechef.com/IPC15CMR/problems/SURESH/

Thank you .

1 Like

Same question i am going to ask because by simple logic the answer of test case
5 0.438588
5 0.515693 must be 11.400428×2+9.695699=32.504271 but they saying answer is 31.8022945983
Kindly answer the question!

Yes there is something more in this problem perhaps which we are missing out. Things will be clear after editorials are out. Till then check others submissions.

For test case 2 , it is giving 3.9999999996 by manual calculations , but it surely involves some maths to get exact answer .

@admin move the problems to practice area

I think they will not provide editorials like previous contest

May be. Same question is explained here already , have a look.

https://discuss.codechef.com/questions/85672/can-any-one-explain-this-easy-question-candy-game-practice-icpc-with-solution