PREDICT (explanation)

Problem Link:- http://www.codechef.com/JUNE13/problems/PREDICT

Difficulty: Simple

Expalnation:- Look at the sample test case and think it’s a simple maths problem where you just have to divide the money in the ration of their probability. And the formula which we will get is…

if(p<0.5)p=1-p;
Amount = (2 * (1-p) * (p *10000))-((1-p) * 10000)+10000;

Link to my code is:- http://www.codechef.com/viewsolution/2220920

Is it official editorial or not?

2 Likes

@argonaut>>i dont think it is!!!

It is not.

@argonaut, I can provide an explanation later if you wish so, though

@kuruma thanks for your concern man, really appreciate it. But I have solved this problem, editorial just seemed like non-official.

2 Likes