Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Pitcher Rotation
Description For professional baseball team managers, it is an important task to decide the starting pitcher for each game. In the information era, massive data has been collected in professional sports. The manager knows the winning percentage of each pitcher against each team. Unfortunately, when playing against a certain team you cannot always pick the pitcher with the highest winning percentage against that team because there is a rule saying that after pitching a game the pitcher has to rest for at least four days. There are j against team i, and a list of g + 10 numbers, d_{1}, d2, …, d_{g}_{ + 10}, to represent the schedule of the team, where d denotes the opponent team and _{i}d = 0 denotes that there is no game at the _{i}i day of the season. Your task is to decide the starting pitcher for each game so that the expected number of winning game is maximized.^{th}Input The first line contains an integer p_{i}_{1}, p_{i}_{2}, …, p, where each _{in}p is a two-digit number (for example, 92 represents 0.92). The next _{ij}g + 10 lines describe the schedule of the season, d_{1}, d_{2}, …, d_{g}_{ + 10}.Output The maximum value with exactly two digits past the decimal point of expected game won for these Sample Input 1 5 3 6 91 90 50 50 50 65 40 60 60 60 66 40 60 60 60 1 2 3 3 2 1 0 0 0 0 0 0 0 0 0 0 Sample Output 4.26 Source |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator