| Winter Cup 7.0 Online Mirror Contest |
|---|
| Закончено |
During the holy month of Ramadan, Rami and Yassine have a special tradition. Every night, after breaking their fast at iftar, they head to their favorite coffee place to engage in friendly games while waiting for suhoor. One evening, they decide to play a modified version of Rock-Paper-Scissors as a card game.
There are only three types of cards: Rock, Paper, and Scissors.
The game proceeds in turns as follows:
Now both players play optimally, and fairly:
Given the initial deck compositions $$$R_1, P_1, S_1$$$ for Rami and $$$R_2, P_2, S_2$$$ for Yassine, compute the probability of each player winning the game.
A single line containing six integers $$$1 \leq R_1, P_1, S_1, R_2, P_2, S_2 \leq 18$$$.
It is guaranteed that: $$$$$$ 3 \leq \max(R_1 + P_1 + S_1, R_2 + P_2 + S_2) \leq 20 $$$$$$
Print two floating-point numbers $$$0 \leq p_1, p_2 \leq 1$$$:
1 1 1 1 1 1
0.5 0.5
4 5 6 5 5 5
0.482774 0.517226
The first test case corresponds to a traditional rock paper scissor game. It can be proven that the optimal strategy for each player, is to choose any card, with the same probability.
| Название |
|---|


