Valentine's Day '18 J3 - Are they cute?

View as PDF

Submit solution


Points: 5 (partial)
Time limit: 3.0s
PyPy 2 1.4s
PyPy 3 1.4s
Memory limit: 64M
PyPy 2 128M
PyPy 3 128M

Author:
Problem type

Carol and Cactus think that everything is cute. However, cuteness, like everything is all relative.

For someone to be relatively cute, they must be cuter than more than half of the people present. You are seeking out potential partners, and you must be able to identify the cute people! Given the N values of cuteness (not in Carol numbers), decide if each person is cute.

Constraints

1 \le N \le 10^4

1 \le K_i \le 10^6

2 \le |S_i| \le 10

Input Specification

The first line will contain N, the number of people.

The following N lines will contain a string S_i and K_i, the name of the i^\text{th} person and their cuteness.

The name of the person will consist of one uppercase letter followed by only lowercase letters.

Output Specification

For each person output:

  • {Name} is cute! <3 if that person is cute.
  • {Name} is not cute. </3 if that person is not cute.

Sample Input 1

4
Carol 100
Allan 5
Cactus 1000
William 1

Sample Output 1

Carol is not cute. </3
Allan is not cute. </3
Cactus is cute! <3
William is not cute. </3

Sample Input 2

7
Tristan 888
Peibae 503
Clive 444
Royi 231
Dordor 564
Stacy 43
Chad 54

Sample Output 2

Tristan is cute! <3
Peibae is cute! <3
Clive is not cute. </3
Royi is not cute. </3
Dordor is cute! <3
Stacy is not cute. </3
Chad is not cute. </3

Explanation for Sample Output 2

While the first five people are all quite cute, only Tristan, Peibae and Dordor are cuter than 4 or more people.


Comments

There are no comments at the moment.