Problem Statement | |||||||||||||
You have a skewed random number generator that outputs the number i with percentage probs[i]. Given that you have generated n numbers, return the probability (between 0 and 1) that value has been generated more times than any of the other numbers. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Notes | |||||||||||||
- | The returned value must be accurate to 1e-9 relative or absolute. | ||||||||||||
Constraints | |||||||||||||
- | probs will contain between 1 and 5 elements inclusive. | ||||||||||||
- | Each element of probs will be between 1 and 100 inclusive. | ||||||||||||
- | The elements of probs will sum to 100. | ||||||||||||
- | n will be between 1 and 15 inclusive. | ||||||||||||
- | value will be between 0 and N-1 inclusive, where N is the number of elements in probs. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
|