NOI Contest Archive

Archive / 2024 / February 2024

Ranker

Medium · NOI 2024 february monthly contest

You are given the rank R you want to find, followed by the names of students and their corresponding marks in a particular coding challenge. Your task is to determine the name of the student who achieved the specified rank.

Input Format

Output Format

Print the name of the student who achieved the Rᵗʰ rank in the class.

Constraints

Sample Input 0

2
Yashed Senura Nethmi Terence Ayash
95 85 90 75 90

Sample Output 0

Ayash
Nethmi

Sample Input 1

3
Alice Bob Charlie David
80 70 80 90

Sample Output 1

Bob