10261_PitcherRotation

2022-5-16 18:16| 发布者: Hocassian| 查看: 83| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-3-89504707860500-Problem List-采集的数据-后羿采集器.html

Pro.ID

10261

Title

Pitcher Rotation

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=10261

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 4000/2000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    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 n pitchers (5 ≤ n ≤ 100), m opponent teams (3 ≤ m ≤ 30), and there are g (3 ≤ g ≤ 200) games in a season, and the season lasts for g + 10 days. Furthermore, there is at most one game per day. You are given an m by n matrix P, where an element in P, Pij, denote the winning percentage of pitcher j against team i, and a list of g+10 numbers, d1, d2, …, dg+10, to represent the schedule of the team, where di denotes the opponent team and di = 0 denotes that there is no game at the ith 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.

    输入

    The first line contains an integer t (1 ≤ t ≤ 5) indicating the number of teams that need your help. The data about these t teams follows. For each team, the first line contains the number of pitchers n, the number of opponent teams m, and the number of games in a season g. The next m lines contains the information about winning percentage of each pitcher against each team; the first line is p11, p12, …, p1n, and the ith line is pi1, pi2, …, pin, where each pij is a two-digit number (for example, 92 represents 0.92). The next g+10 lines describe the schedule of the season,d1, d2, …, dg+10.

    输出

    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 n pitchers (5 ≤ n ≤ 100), m opponent teams (3 ≤ m ≤ 30), and there are g (3 ≤ g ≤ 200) games in a season, and the season lasts for g + 10 days. Furthermore, there is at most one game per day. You are given an m by n matrix P, where an element in P, Pij, denote the winning percentage of pitcher j against team i, and a list of g+10 numbers, d1, d2, …, dg+10, to represent the schedule of the team, where di denotes the opponent team and di = 0 denotes that there is no game at the ith 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.

    Input

    The first line contains an integer t (1 ≤ t ≤ 5) indicating the number of teams that need your help. The data about these t teams follows. For each team, the first line contains the number of pitchers n, the number of opponent teams m, and the number of games in a season g. The next m lines contains the information about winning percentage of each pitcher against each team; the first line is p11, p12, …, p1n, and the ith line is pi1, pi2, …, pin, where each pij is a two-digit number (for example, 92 represents 0.92). The next g+10 lines describe the schedule of the season,d1, d2, …, dg+10.

    Output

    The maximum value with exactly two digits past the decimal point of expected game won for these t teams in the order of their appearance in the input file, output the answer for each team in separated lines.

    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

    样例输入

    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

    样例输出

    4.26

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部