GlobeX Cup '18 J2 - Mark Gambling

View as PDF

Submit solution

Points: 5 (partial)
Time limit: 1.0s
Memory limit: 64M

Problem type

After Winnie’s math teacher watched an anime about gambling, she decided to spice up the marking system in the class. At the end of the year, students can either take the average of their marks, or one mark randomly selected from the evaluations they had. Winnie will take the one random mark as her final mark if it has above a 50\% chance to be higher than her normal mark, otherwise, she will take her average of her marks as her final mark. Assume all evaluations have the same weight in this question (they all contribute equally to her final mark).

Input Specification

The first line will contain a single integer N\ (1 \le N \le 10^5), the number of assessments Winnie had.

The next line will contain N integers x_i\ (0 \le x_i \le 100), the mark Winnie got on each evaluation as a percentage.

Output Specification

Output Winnie should take the risk if Winnie should take the one random mark as her final mark, or That's too risky If she should take her average mark instead.


Subtask 1 [30%]

N \le 10^3

Subtask 2 [70%]

No further constraints.

Sample Input

0 100 100

Sample Output

Winnie should take the risk

Explanation For Sample

Winnie has a 66.\overline{6}\% average. If she takes a random mark, she has a \frac{2}{3} chance to get a mark higher than her average (one of the 100\%s). Therefore Winnie should take the risk and choose a random assessment as her final mark.


There are no comments at the moment.