Skip to content

Latest commit

 

History

History

tribes_problem

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

In a remote island, there lives three tribes - The Rock Tribe, The Scissor Tribe and The Paper Tribe. If two individuals of different tribes meet (probability of meeting is equal for all tribes) then the tribe of one person can kill the person belonging to other tribe according to following rules:

  1. Rock tribe people can kill people of Scissor tribe.
  2. Scissor tribe people can kill people of Paper tribe.
  3. Paper tribe people can kill people of Rock tribe.

Your task is to determine for each tribe, what is the probability that this tribe will be the only one to inhabit this island after a long enough period of time?

Input Format First line will contain three integers r, s and p, denoting the person of Rock, Scissor and Paper tribe respectively.

Constraints 1 lessthan= r, s, p lessthan= 100

Output Format Print three space separated real numbers, denoting the probabilities, at which the Rock Tribe, the scissor Tribe and the Paper Tribe will be the only surviving tribes, respectively.

NOTE: Round off your answer up to 5 digits after decimal. Sample TestCase INPUT 3 3 3

OUTPUT 0.33333 0.33333 0.33333