#P3849. [TJOI2007] 足彩投注
[TJOI2007] 足彩投注
Description
We now consider a simplified model. In one round, the bettor needs to predict the results of matches. Each match’s win-draw-loss outcomes have probabilities . Here, denotes the -th match and denotes the home team’s loss, draw, and win, respectively. The value is the probability that match ends with result . In addition, denotes the probability that, among all purchased bets, result is chosen for match , i.e., the fraction of the total number of bets that select that outcome for that match.
For example, if , then we know that of the bets choose the home team to lose in the first match. We assume these matches are independent, i.e., the outcomes are independent across matches, and the selections are also independent across matches (with ).
In this model, a ticket wins only if it correctly predicts all matches. The total prize pool is and is shared equally among all winning bets. Therefore, for a single bet , where is the predicted result of bet for match , its winning probability is:
Let the total number of bets be . Then the total number of winning bets is:
$$N \cdot Q(R_i)=N\cdot\prod\limits_{j=1}^n q(j, r_{ij}).$$Hence, the expected prize (the average prize) received by bet is:
The above only considers single bets, i.e., the winning of a single . For multiple bets, the situation is more complicated. A multiple bet is a set , where is the number of bets. For example, with three matches, if the first match is “win or loss,” the second is “draw,” and the third is “loss or draw,” then , and the set contains the following four elements:
| 0 | 1 | 0 | |
| 1 | |||
| 2 | 0 | ||
| 1 |
In a multiple bet , you win if at least one predicts all results correctly. Therefore, the expected prize of is:
$$\sum_{R_i\in R}\dfrac{M}{N\cdot Q(R_i)} \cdot P(R_i).$$The problem: given the information for matches (the probabilities of outcomes and the probabilities that bettors buy those outcomes), and the maximum number of bets allowed in a multiple bet, design a multiple betting scheme that does not exceed the maximum number of bets () and maximizes the expected prize.
Input Format
The first line contains four positive integers , where and .
Each of the next lines contains six real numbers. The six real numbers on line are $p(i, 0), p(i, 1), p(i, 2), q(i, 0), q(i, 1), q(i, 2)$, describing match . Here, , , and .
Output Format
Output a real number, the natural logarithm of the maximum expected prize:
$$\ln \left( \operatorname{max}_{\lvert R \rvert \le U}\left\{\sum_{R_i\in R}\dfrac{M}{N\cdot Q(R_i)} \cdot P(R_i)\right\}\right).$$Print the answer with decimal places (rounded half up).
1 10 10 1
0.3 0.2 0.5 0.7 0.2 0.1
1.609
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号