Question: mara:Pls help for this programing problem in c++ (standard IO without file read/write),better with some comment about why coding that way,thanks Problem C: Marathon Time

mara:Pls help for this programing problem in c++ (standard IO without file read/write),better with some comment about why coding that way,thanks

mara:Pls help for this programing problem in c++ (standard IO without file

Problem C: Marathon Time limit: 2 seconds Problem Description In 2010/11/6, Chinese Taipei Road Running Association (CTRRA for short) held the Taroko Gorge Marathon. There are thousands of people join. CTRRA needs a program to record the marathoners finish time and find the best three marathoners for awarding prizes. Please write a program such that after users enter the players IDs and grades, the program prints the best three in the correct order. If there are less than three players, then print all of them. We assume that all the grades are different. Input Format There are several test cases. The first line of each test case contains an integer n which indicates the number of players. In the following n lines, each line contains the record of one player, an ID followed by a grade. An ID is a positive integer at most 9999, and n is at most 100. The case with n 0 indicates the end of the input, and you do not need to process it. Output Format Print the best three players and their grades, separated by a space Sample Input Sample Output 6789 218 8912 2'20 1234 2'13 4567 216 1234 2'13 4567 216 6789 2 18 ase 2: 1002 333 1003 344 1003 3'44 1002 3 33

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!