DMOPC '19 Contest 5 P0 - Concurrent Competitor Counting

View as PDF

Submit solution


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

Author:
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 si, the name of the participant, and an integer xi, their score.
It is guaranteed that all si 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.

Constraints

In all tests,
1N100
1xi,C100
1|si|50

Sample Input 1

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

Sample Output 1

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

Sample Input 2

Copy
1 48
vrotherin 48

Sample Output 2

Copy
vrotherin will not advance

Comments

There are no comments at the moment.