0% found this document useful (0 votes)
39 views5 pages

Level 3

The document provides instructions for a task to calculate player points based on wins and losses, where wins add a set number of points and losses subtract a different number of points. Players are sorted in descending order by point count, and in the case of a tie the player with the lower player ID comes first. Sample input and output formats are provided showing player IDs, scores for each game, and the resulting point counts for each player.

Uploaded by

Tudor Pricop
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)
39 views5 pages

Level 3

The document provides instructions for a task to calculate player points based on wins and losses, where wins add a set number of points and losses subtract a different number of points. Players are sorted in descending order by point count, and in the case of a tie the player with the lower player ID comes first. Sample input and output formats are provided showing player IDs, scores for each game, and the resulting point counts for each player.

Uploaded by

Tudor Pricop
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/ 5

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

You might also like