13 of 36 event organizer
Corpo:
I’ll give you a story. When I joined
MatchoTech I was a plebeian. I scrubbed
floors and made coffee for the … then
suits and ties.
I’ll be truthful to; yes, I kissed some a** and
did what I was told just so I can get
promoted. I expect you do the same,
newbie.
Task for Level 3:
Calculate the points of each player!
14 of 36 event organizer
› For this level, we’re going to start treating wins and losses differently.
› Each win will award a number of points and each loss will remove a different
amount of points.
› In the input you will find the win increment and loss decrement values.
› In case there are players with the same amount of points, the one with the
lowest player id comes before the others.
15 of 36 event organizer
Input Output
winIncrement lossDecrement playerId pointCount
gameCount playerCount playerId pointCount
Format player1Id scorePlayer1 player2Id scorePlayer2 … repeated for all players sorted in descending order by
… repeated for each game... pointCount …
player1Id scorePlayer1 player2Id scorePlayer2 playerId pointCount
gameCount - Integer. Represents the number of games played for this test playerId - Integer.
case pointCount - Integer. Amount of points obtained by the
playerCount - Integer. Represents the number of players involved in this player.
test case.
winIncrement - Integer. Amount of points a player gains when winning.
lossDecremeent - Integer. Amount of points a player losses when losing.
Types
player1Id - Integer. Id of the first player involved in the game.
player1Id < playerCount.
player1Score - Integer. Number of points obtained by the first player.
player2Id - Integer. Id of the second player involved in the game.
player2Id < playerCount.
player2Score - Integer. Number of points obtained by the second player.
25 20 2 75
10 5 4 50
2 970 3 345 0 35
0 799 4 992 3 -10
2 905 3 797 1 -100
2 482 3 251
Example 1 189 3 660
0 774 4 867
0 580 1 62
0 431 1 150
1 427 3 877
0 782 1 432
16 of 36 event organizer
GOOD LUCK
37 of 36 event organizer