Woburn Challenge 2018-19 Round 2 - Senior Division

Ilsa Faust, an experienced former MI6 agent, has agreed to join the IMF and work alongside Ethan Hunt!
As part of her onboarding process at the secret IMF headquarters in
Ottawa, Ilsa is required to complete a training exercise involving
defusing a bomb. However, she feels that simply defusing a bomb would be
an insultingly easy task for her, so she's going to show off her
multitasking skills and defuse
Each bomb becomes defused as soon as two particular wires are both cut.
As such, Ilsa will need to cut
It's understandably rather difficult to keep track of that many wires,
so Ilsa is going to cut the
Ethan was hoping to meet up with Ilsa, but he's walked in while the
training session is underway, at a random point in time after she's cut
some unknown number of wires
Subtasks
In test cases worth
In test cases worth another
Input Specification
The first and only line of input consists of two space-separated
integers,
Output Specification
Output a single real number, the expected number of remaining wires Ilsa
has yet to cut. Your answer must have at most
Sample Input 1
1 0
Sample Output 1
1.5
Sample Input 2
2 0
Sample Output 2
3.125
Sample Input 3
2 1
Sample Output 3
1.25
Sample Explanation
In the first case, when the single bomb hasn't yet been defused, it's
equally likely that Ilsa has cut either
Comments