Fişierul intrare/ieşire: | chess2.in, chess2.out | Sursă | IIOT 2022-23 Runda 1 |
Autor | Stefan Dascalescu | Adăugată de | |
Timp execuţie pe test | 0.25 sec | Limită de memorie | 65536 kbytes |
Scorul tău | N/A | Dificultate | N/A |
Vezi solutiile trimise | Statistici
Chess Tournament 2
You want to organize a chess tournament in your town but given the recent developments in the chess world, you want to use some extra measures to make sure that everyone playing there is playing fairly.
Thus, you came up with a system to decide the strength of each move played by each player and in order to decide whether a player cheated or not, you decided to compute the average move strength and if it exceeded a certain threshold based on that player's initial chess rating, then you conclude that a player cheated.
More formally, you are given the data from t chess players. For each chess player you know the number of moves they made during the contest, as well as the initial elo and the threshold you are going to use.
Based on the rules described in the statement, decide whether each player cheated or not.
Date de intrare
The first line of the input file chess2.in will contain t, the number of players which played in the tournament.
The first line of each test case will contain n, elo and threshold, representing the number of moves the i^{th} player made during the tournament, the initial rating the player had and the threshold you are going to use for this player.
The second line of each test case will contain n values, representing the strengths of the moves the player did.
Date de ieşire
The output file chess2.out will contain for each player a message, namely "Cheater" if the player cheated or "Innocent" otherwise (without the quoting marks).
Restricţii
- 1 ≤ t ≤ 100
- 1 ≤ n, threshold ≤ 1000
- 1 ≤ elo ≤ 3500
- 1 ≤ strength[i] ≤ 5000
Exemplu
chess2.in | chess2.out |
---|---|
3 5 800 400 900 1000 1500 1300 1400 8 1000 200 950 800 1000 1100 1200 845 100 924 6 2500 400 1900 2100 950 2500 2000 3000 | Cheater Innocent Innocent |
Explicaţie
The first player's move strength is 6100 / 5 = 1220, which is greater than 1200, the maximum threshold allowed.
The other two players have not cheated, thus they are innocent.