DMOPC '19 Contest 5 P0 - Concurrent Competitor Counting

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 64M

Problem type

Serena is trying to figure out who will move on to her competition's second stage. She has a list of N names, their corresponding scores, and the cutoff C.

A participant will advance to the second stage if and only if their score is strictly greater than the cutoff.

Input Specification

The first line contains two space-separated integers, N, the number of participants, and C, the cutoff.
The next N lines contain a string s_i, the name of the participant, and an integer x_i, their score.
It is guaranteed that all s_i are distinct, and contain only lowercase letters of the Latin alphabet.

Output Specification

For each of the N lines, print [s_i] will advance if their score is strictly greater the cutoff, or [s_i] will not advance otherwise. Output should correspond to the order the names appear in the input.


In all tests,
1 \le N \le 100
1 \le x_i, C \le 100
1 \le |s_i| \le 50

Sample Input 1

5 55
georgechen 24
kevinwan 42
tankibuds 56
richardzhang 1
tzak 99

Sample Output 1

georgechen will not advance
kevinwan will not advance
tankibuds will advance
richardzhang will not advance
tzak will advance

Sample Input 2

1 48
vrotherin 48

Sample Output 2

vrotherin will not advance


There are no comments at the moment.