Question: Please use C and please don't use stdlib.h and please see the sample input and output carefully. Thank You. Rank Bibi is a lecturer at

Please use C and please don't use stdlib.h and please see the sample input and output carefully. Thank You.

Rank Bibi is a lecturer at a university. At the end of the exam, Bibis students always come to her and ask about their ranking in the exam. Because Bibi is a good lecturer, Bibi always gives answers to them by looking at the grades book one by one. However, Bibi also felt that there was a faster way than having to check each students name one by one in the grades book. She also asked for your help to create a program that seeks a student ranking from the student data. If there are students who have the same value, then the ranking will be determined based on lexicographic order. So, if there are 2 students named AAA and BBB with a value of 80. Then the AAA rating will be above BBB. Format Input The first line input contains T , the number of testcases. For each testcase consists of several lines. For the first row, it consists of N , which is the number of students taught by Bibi. For the next N line consists of NAME#VALUE of each student. On the N + 1 row consists of 1 name, the name of the student who asked about his ranking. Format Output For each test case, generate Case #X: Y , where X represents the test case number and Y shows the rank of the student. Constraints 1 T 10 1 N 1000 1 |NAMA| 10 1 N ilai 1000 Sample Input (standard input)

2 3 Jojo#40 Lili#80 Bibi#90 Lili 3 Jojo#100 Lili#80 Bibi#90 Lili Sample Output (standard output) Case #1: 2 Case #2: 3 Note Even though it is not stated explicitly, you should know by now that excessive space / newline are treated as WRONG ANSWER.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!