gpt4 book ai didi

java - 多个项目之间的排序算法,而不仅仅是两个项目(篮球)之间的排序算法?

转载 作者:塔克拉玛干 更新时间:2023-11-03 06:04:12 25 4
gpt4 key购买 nike

我们需要对篮球队进行分类。

程序在这里供引用:

D.1 Procedure
Teams shall be classified according to their win-loss records, namely two (2) points
for each game won, one (1) point for each game lost (including lost by default) and
zero (0) points for a game lost by forfeit.

D.1.1 If there are two (2) teams in the classification with equal points, the result(s) of the
game(s) between the two (2) teams involved will be used to determine the placing.

D.1.2 If the points and the goal average in the games between the two (2) teams are still
the same, the classification will be determined by the goal average of all the games
played in the group by each team.

D.1.3 If there are more than two (2) teams in the classification with equal points, a second
classification will be established, taking into account only the results of the games
between the involved teams.

D.1.4 If at any stage of this procedure the number of teams with equal points is reduced
to only two (2) teams, the procedure in D.1.1 and D.1.2 above will be applied.

D.1.5 If in the second classification there are still teams with equal points, the goal
average will be used to determine the placing, taking into account only the results
of the games between the involved teams.

D.1.6 If there are still more than two (2) teams with the same goal average, the placing
will be determined using the goal average from the results of all their games played
in the group.

D.1.7 If at any stage of this procedure the number of teams with equal points is reduced
to a tie still involving more than two (2) teams, the procedure, beginning with D.1.3
above, is repeated.

D.1.8 Goal average will always be calculated by division.

问题是如何处理 D.1.3 部分,该部分说:如果在分类中有超过两 (2) 支球队得分相同,则第二支球队
将建立分类,仅考虑比赛结果
如何对第二个分类进行建模以及如何根据他们之间的游戏结果做出决策?

最佳答案

对于积分相等的 k 个球队,构建一个较小的“联赛表”,大小为 k,其中将仅根据这些球队之间的比赛来填充积分和进球数。

在这个较小的表上递归地激活排序过程。

如果在 2 次递归调用之间没有团队减少 [团队完全相等] 或建立完整排名,则停止。如果列表仅由两支得分相同的球队组成:适用次要标准。

关于java - 多个项目之间的排序算法,而不仅仅是两个项目(篮球)之间的排序算法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8175003/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com