Question: Sample Input 1 : 9 1 5 8 1 8 7 1 8 5 1 4 7 1 3 7 1 3 7 1 3

Sample Input 1:
9
158187185
147137137137135140145140135
395175713
136135132146138139132142130
Sample Output 1:
714926583
841936752
Explanation:
First Input
Second set of Input
Third set of Input
Position of musicians in back row
Position of musicians in front row
The first input line represents the number of musicians in each row. Here it is 9. The next 4 lines represent therank and the height of the back and front rows.
\table[[Back Row Rank,1,5,8,1,B,7,1,8,5],[\table[[Back Row],[Height]],147,137,737,737,135,140,145,140,135],[\table[[Front Row],[Rank]],3,9,5,1,7,5,7,,3],[\table[[Front Row],[Height]],136,135,132,146,138,139,132,142,130]]
We reed to arrange the musicians in such a way that they stand in increasing order of rank and the height of the musiclans in the front row is lesser than the ones in the back row.
After arranging them with these constraints, the position of the musislans needs to be given as output.
The position represents the place where the musician stands.
Back Row Rank.
11
5
a
17
 Sample Input 1: 9 158187185 147137137137135140145140135 395175713 136135132146138139132142130 Sample Output 1:

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!