1545 - Liang Guo Sha
Time Limit : 1 Second
Memory Limit : 128 MB
Submission: 4
Solved: 3
- Description
- Maybe you know “San Guo Sha”, but I guess you didn’t hear the game: “Liang Guo Sha”!
Let me introduce this game to you. Unlike “San Guo Sha” with its complicated rules, “Liang Guo Sha” is a simple game, it consists only four cards, two cards named “Sha”, and the other named “Shan”.
Alice and Bob are good friends, and they’re playing “Liang Guo Sha” now. Each round, everyone choose a card of his/her own, and show it together. If both of them choose “Sha”, then Alice gets A points; if both of them choose “Shan”, thenAlice gets B points; otherwise, Bob gets C points.
Here is the question, if both Alice and Bob use the optimal strategy to make their points higher, what is the expectation point which Alice can get in a round? - Input
- Several test case, process to EOF.
Each test case has only a line, consists three positive integers: A, B, C respectively.
1 <= A, B, C <= 100000 - Output
- Each test case just need to output one line, the expectation point that Alice can get. Round to 6 decimal points.
- sample input
-
2 10 4 3 3 3
- sample output
-
0.200000 0.000000
- hint
- source
- Luo KangQi | 2011 Multi-University Training Contest 8 - Host by HUST