Go to Jinju! (Easy)
InterviewTime limit1sMemory limit512 MB
Given N transport options with destinations and fares, find the fare to jinju and count the options that cost more than it.
- Level
Easy1 of 10
- Topics
- Implementation, Array
- Solved
- No attempts yet
Problem
This problem is the same as "Jinju Let's Go! (Hard)" except for the range of the input numbers.
Bosun, a Gyeongsang National University graduate worn out by life in Seoul, missed his college days and wanted to visit Jinju, where the university is. So Bosun went straight to the Seoul bus terminal to take a day trip to Jinju.
The Seoul terminal has transport options. Each option has a destination and a fare, and all destinations are different. The destination jinju is always among them, and it marks the option that goes to Jinju.
Bosun is tired and does not want to check all options. Bosun asks you to find the fare to Jinju and the number of options that cost more than it.
Input
The first line contains , the number of transport options at the Seoul terminal. ()
Each of the next lines contains the destination and the fare of the -th option, separated by a space. is a string of lowercase English letters with length from 1 to 15. Exactly one has jinju, and that option goes to Jinju. ()
All numbers in the input are integers.
Output
The first line prints the fare of the option going to Jinju.
The second line prints the number of options that cost more than the option going to Jinju.