Computer Science, asked by ykamalsai, 9 months ago

Adi and his brother Vabu are playing a game with arrays.
Vabu has an array A and Adi an array B of sizes N and M respectively. Since Vabu is the elder brother he wants
every value of his array to be greater than or equal to the values of his brothers array.
In other words for every pair ij A[i]>=B[j]. In one operation he can increase or decrease any element of
array A or array B by 1. Since he is always in a hurry he wants to perform this in minimum operations.
Can you help him in this simple task?​

Answers

Answered by shrawan85356
12

Answer:

abu has an array A and Adi an array B of sizes N and M respectively. Since Vabu is the elder brother he wants every value of his array ...

Similar questions