Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1: Rank the IMO Participants International Mathematical Olympiad (IMO) is held each year since 1959. It is the oldest of the kind. Each team

image text in transcribed

Question 1: Rank the IMO Participants International Mathematical Olympiad (IMO) is held each year since 1959. It is the oldest of the kind. Each team contains 6 members. The rank of a team is decided by the sum of the scores of all its 6 members. The rank of a participants is decided by his/her individual scores among all the participants. You are asked to develop a program to rank the teams and the participants. Some more detailed requirements: The score of a participant is an integer and in the range of [0, 50). 2D array is used to store a predefined data set. Ranking an array is different from sorting an array. Assume an array is {3, 4, 2}, the ranks of the elements in ascent order are {2,3,1}. If two elements are the same, they are ranked the same. The next rank after the duplicate elements should be added by 1. Assume an array is {3, 3, 4, 2}, the ranks are 2, 2, 4, 1}. Intensively use array and loop. No need to use any sorting algorithm. Print the results. You do not need to sort the results. Sample Testing Case: The raw data: P3 17 Team 1 Team 2 Team 3 P1 39 40 42 P2 40 41 4 0 27 26 42 42 The printed results: The ranking list: P1 P2 P3 P4 P5 P6 Team 1 39(11) 40 (8) 17(17) 35 (13) 42 (1) 6(18) Team 2 40 (8) 41 (6) 27 (15) 41 (6) 42 (1) 36(12) Team 3 42 (1) 40 (8) 26 (16) 42 (1) 42 (1) 35 (13) Total Rank 1793 227 1 227 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Big Data Interview 751 Comprehensive Questions And Expert Answers

Authors: Mr Bhanu Pratap Mahato

1st Edition

B0CLNT3NVD, 979-8865047216

More Books

Students also viewed these Databases questions

Question

Why have streamers been successful in the Scripted content space?

Answered: 1 week ago