Soccer Standings(c++)

该博客介绍了如何使用C++编程实现一个世界杯足球赛的团队积分和排名系统。系统根据比赛成绩计算各队的得分、胜平负场次、进球和失球数,并依据这些数据进行排序。具体实现包括读取比赛数据,计算各队指标,并使用自定义排序函数对球队进行排名。
摘要由CSDN通过智能技术生成

Soccer Standings (足球排名)(c++)

Soccer fever has gripped the world once again, and millions of people from dozens of countries will be glued to their TV sets for the World Cup. Being an enterprising sort, you’ve started up your own internet World Cup Soccer Channel for streaming matches online. Recently you came up with the idea of filling up the time between matches by having a couple of ‘experts’ offer critical analysis of games. For this purpose, you have devised a unique ranking system for soccer teams, which you must now implement.

**The Problem:**

Given a list of teams and a list of match scores, you must compute several quantities for each team. These are: the total number of goals scored over all their games, the total number of goals scored against them (goals allowed, for short), the number of wins, draws and losses, and the number of points scored so far. Points are to be computed as follows: winning a match nets a team 3 points, losing gets them nothing. In the event of a tie, both teams get 1 point.

In addition to this, you must order the teams correctly according to your new system. Teams are ordered according to points, from highest to lowest. In the event of a tie in points, the team that has a higher goal difference comes first. The goal difference is defined as the total number of goals sc

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值