0% found this document useful (0 votes)
107 views7 pages

Level 5

This document provides instructions for calculating Elo ratings for players on teams. It explains that a team's rating is the sum of its players' ratings minus the sum of the opposing team's ratings. Players are sorted by rating and output along with their calculated rating. Sample input and output formats are provided.

Uploaded by

Stefan Parus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views7 pages

Level 5

This document provides instructions for calculating Elo ratings for players on teams. It explains that a team's rating is the sum of its players' ratings minus the sum of the opposing team's ratings. Players are sorted by rating and output along with their calculated rating. Sample input and output formats are provided.

Uploaded by

Stefan Parus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

23 of 36 event organizer

Corpo:

The way to the top is full of tears, crushed


dreams and pain. Not yours of course, but
everyone around.

What do you mean that’s not humane?


Wake up, rookie, we’re not in Kansas. This
is corporate life. Humane is oldschool,
machine-like is the new norm. Numbers,
not faces, profit, not stability, that’s what it
is all about.

24 of 36 event organizer
Corpo:

Disagree about it all you want. This isn’t a


meta-social commentary about the
current state of things, it’s reality. You
either gobble up SOMA to forget about it
or learn to live with it and stand by it.

We’re nearly there, rookie - 2 more to go.

Task for Level 5:


Calculate the ELO of players in teams!

25 of 36 event organizer
› Games will now be playable in teams.

› Team size will be given as an input parameter.

› You will be given a list of matches and need to output the rating of all players
after them.

› A team wins if the sum of the points obtained by its players is more than the
sum of the points obtained by the other team’s players.

› In case there are players with the same amount of points, the one with the
lowest player id comes before the others.

26 of 36 event organizer
› When calculating the rating update, the opponent’s rating is considered to be
the sum of the opponents’ ratings minus the sum of your teammates’
ratings.

› For example, if the first team has players A (1200), B(1220), C(1215) and the second
team has players D(1300), E(1180), F(1200), then the rating of the opponent of A is
considered to be D + E + F - B - C = 1245

27 of 36 event organizer
Input Output

gameCount playerCount playersPerTeam playerId rating


pId0 pS0 pId1 pS1 pId2 pS2 … pIdn-1 pSn-1 playerId rating
Format … repeated for each game... … repeated for all players sorted in descending order by
pId0 pS0 pId1 pS1 pId2 pS2 … pIdn-1 pSn-1 rating …
playerId rating

gameCount - Integer. Represents the number of games played for this test playerId - Integer.
case rating - Integer. ELO rating of the player
playerCount - Integer. Represents the number of players involved in this
test case.
playersPerTeam - Integer. Amount of players in one team
Types n - Integer. Amount of players in one game. 2*playersPerTeam
pIdi - Integer. Id of the i-th player from one game. If i <
playersPerTeam then the player is in the first team, otherwise in the
second team.
pSi - Integer. The score obtained by the i-th player.

9 10 2 2 1059
2 8815 3 13997 6 4316 9 4545 7 1032
2 9038 6 12056 7 12167 8 20846 0 1029
2 4902 3 7784 4 1839 8 2586 6 1001
0 12817 1 10553 5 4892 9 5265 5 1000
Example 0 3671 2 2908 3 1738 9 1537 1 993
1 7630 3 11658 6 15166 7 11231 4 984
2 6634 5 8656 7 3959 8 6783 8 969
1 11290 2 10865 3 7027 8 7490 3 968
1 6022 3 9201 6 20384 7 15095 9 953

28 of 36 event organizer
GOOD LUCK
37 of 36 event organizer

You might also like