Computer Science, asked by varsha1958, 5 months ago

ed to press "Final Submit" for your program to be co
Alex has been preparing a box for handicraft. The box
consists of N pieces of stones with each stone having
a certain weight assigned to it. Each stone in the box
will carry a different weight. This means no two
stones can have the same weight.
Alex wants to do this by making minimal changes in
the original weight of the stones, making each stone
weigh at least as much as its original weight.
Find the minimum total weight that he can set for the
box.
Note: Stone weights are not in float value.
Input
1. First input contains N, the total number of stones in
the box
2. Second input contains N sorted integers separated
by newline A1, A2 ... An, representing the original
weights assigned to each stone
Violation of Input criteria: System should display
message as 'Wrong Input".
Output
The minimum total stone weights Alex can set the box
for
Constraints
1 <=N <= 100000
1 <=A[i] <= 100000
write a program code for this

Answers

Answered by Anonymous
10

Explanation:

THE QUESTION IS TOO LONG.........

Plz mark my answer as brainliest..

Plz thank my answers...

Do follow me...

Give thnx = Take thnx

Similar questions