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 :
Sample Output :
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 The next lines represent therank and the height of the back and front rows.
tableBack Row Rank,tableBack RowHeighttableFront RowRanktableFront RowHeight
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.
a
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
