#K91842. Game Score Calculator

    ID: 38065 Type: Default 1000ms 256MiB

Game Score Calculator

Game Score Calculator

The problem involves calculating the final score of a player based on a sequence of game events. Each event has an associated point value. After computing the total score (S), the player’s performance is categorized as follows:

(\textbf{Defeated: } S < 0)
(\textbf{Novice: } 0 \le S \le 100)
(\textbf{Intermediate: } 101 \le S \le 200)
(\textbf{Advanced: } 201 \le S \le 300)
(\textbf{Expert: } S > 300)

The event-to-points mapping is defined as:
- quest: 50 points
- battle_win: 100 points
- battle_loss: -20 points
- treasure: 75 points
- trap: -30 points

inputFormat

The input is read from standard input. The first line contains a single integer (N) denoting the number of events. Each of the following (N) lines contains one event as a string.

outputFormat

Output to standard output a single string that indicates the performance category.## sample

3
trap
battle_loss
trap
Defeated