Winner——全胜者
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Statement
teams participate in a chess team tournament. Each team consists of players. The tournament uses a round-robin format, with a total of games. In each game, the players from the two teams are randomly paired to play against each other, and each game is guaranteed to have a winner. After all games are completed, each player has played exactly games. If a player wins all games, they receive a win-win bonus. Find the maximum number of players who can receive a win-win bonus.
Input
The input consists of a single line of two numbers, , separated by a space, representing teams and players per team (, ).
Output
The output is a single number, , representing the maximum number of players who can win the perfect victory prize.
Samples
3 3
4
1 1
1
Notes
For the test case, assume there are the following teams participating in the competition.
-
Team : Players ;
-
Team : Players ;
-
Team : Players ;
The possible results of the game are as follows:
- Team vs. Team :
- vs. , wins
- vs. , wins
- vs. , wins
- Team vs. Team
- vs. , wins
- vs. , wins
- vs. , wins
- Team vs. Team
- vs. , wins
- vs. , wins
- vs. , wins
At this point, only player from team wins the perfect victory prize. In this example, the maximum number of players who could win the perfect victory prize is .
2025 JSUT Collegiate Programming Contest 江苏理工学院新生赛-同步赛
- 状态
- 已结束
- 规则
- ACM/ICPC
- 题目
- 15
- 开始于
- 2025-11-8 12:00
- 结束于
- 2025-11-8 17:00
- 持续时间
- 5 小时
- 主持人
- 参赛人数
- 15