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
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

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.

Constraints

In all tests,
1 \leq N \leq 100
1 \leq x_i, C \leq 100
1 \leq |s_i| \leq 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

Comments

There are no comments at the moment.