10076_Chess

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

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

Pro.ID

10076

Title

Chess

Title链接

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

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 1000/500 MS (Java/Others)     Memory Limit: 32768/32768 K (Java/Others)
  • 描述

    The Association of Chess Monsters (ACM) is planning their annual team match up against the rest of the world. The match will be on 30 boards, with 15 players playing white and 15 players playing black. ACM has many players to choose from, and they try to pick the best team they can. The ability of each player for playing white is measured on a scale from 1 to 100 and the same for playing black. During the match a player can play white or black but not both. The value of a team is the total of players' abilities to play white for players designated to play white and players' abilities to play black for players designated to play black. ACM wants to pick up a team with the highest total value.

    输入

    Input consists of a sequence of lines giving players' abilities. Each line gives the abilities of a single player by two integer numbers separated by a single space. The first number is the player's ability to play white and the second is the player's ability to play black. There will be no less than 30 and no more than 1000 lines on input.

    输出

    Description

    The Association of Chess Monsters (ACM) is planning their annual team match up against the rest of the world. The match will be on 30 boards, with 15 players playing white and 15 players playing black. ACM has many players to choose from, and they try to pick the best team they can. The ability of each player for playing white is measured on a scale from 1 to 100 and the same for playing black. During the match a player can play white or black but not both. The value of a team is the total of players' abilities to play white for players designated to play white and players' abilities to play black for players designated to play black. ACM wants to pick up a team with the highest total value.

    Input

    Input consists of a sequence of lines giving players' abilities. Each line gives the abilities of a single player by two integer numbers separated by a single space. The first number is the player's ability to play white and the second is the player's ability to play black. There will be no less than 30 and no more than 1000 lines on input.

    Output

    Output a single line containing an integer number giving the value of the best chess team that ACM can assemble.

    Sample Input
    87 84
    66 78
    86 94
    93 87
    72 100
    78 63
    60 91
    77 64
    77 91
    87 73
    69 62
    80 68
    81 83
    74 63
    86 68
    53 80
    59 73
    68 70
    57 94
    93 62
    74 80
    70 72
    88 85
    75 99
    71 66
    77 64
    81 92
    74 57
    71 63
    82 97
    76 56
    Sample Output
    2506
    Source

    样例输入

    87 84
    66 78
    86 94
    93 87
    72 100
    78 63
    60 91
    77 64
    77 91
    87 73
    69 62
    80 68
    81 83
    74 63
    86 68
    53 80
    59 73
    68 70
    57 94
    93 62
    74 80
    70 72
    88 85
    75 99
    71 66
    77 64
    81 92
    74 57
    71 63
    82 97
    76 56

    样例输出

    2506

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部