MALD Contest 1 P2 - Scratch Cat and Examinations

View as PDF

Submit solution

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

Problem types
"Find a new home!" - The Scratch Cat's parents after seeing his 89% on a test

During the semester, the Scratch Cat took T examinations. The i^\text{th} examination was out of t_i marks, and the Scratch Cat scored g_i marks.

The Scratch Cat's marks are above the regular expectations; however, his parents are very strict and judge his scores based on the following table. (Note the presence of the ceiling function.)

\lceil x \rceil denotes the ceiling function on x, which rounds it up to the nearest integer.

Let k_i be the percentage score of the i^\text{th} exam:

Grade in % Output
\lceil k_i \rceil>100\% sus
\lceil k_i \rceil=100\% average
98\% \le \lceil k_i \rceil \le 99\% below average
95\% \le \lceil k_i \rceil \le 97\% can't eat dinner
90\% \le \lceil k_i \rceil \le 94\% don't come home
\lceil k_i \rceil < 90\% find a new home


1 \le T \le 10^4

0 \le g_i, t_i \le 10^{15}

t_i \ne 0

Subtask 1 [20%]

0 \le g_i, t_i \le 100

Subtask 2 [30%]

0 \le g_i, t_i \le 10^9

Subtask 3 [50%]

No additional constraints.

Input Specification

The first line will contain an integer T, the number of examinations.

The next T lines will contain two space-separated integers g_i and t_i, the Scratch Cat's score and the total score for the i^\text{th} examination.

Output Specification

Output T lines, with the i^\text{th} line containing the corresponding output for the Scratch Cat's i^\text{th} examination using his parents' grading system.

Sample Input

101 100
99 99
69419 69420
979 1000
933 999
0 1

Sample Output

below average
don't come home
find a new home


There are no comments at the moment.