Elon is a project manager in his company. Recently, the executives decided to give bonus to everyone in his team, so Elon was asked to give a list to them how much bonus each should get. To do this, he selected some pairs of members, and analysed who should get more bonus, and how more much he should get (at least). That is, if employee Tom is better than Jerry, and Tom should get at least 300 dollars more than Jerry, then, if Jerry gets 650 dollars bonus, Tom has to get at least 950 dollars bonus. It should also be noted that, everyone will get at least a minimum, no one will go empty handed. Given all the comparisons, write a C program to find the minimum total bonus to be divided among the employees. If comparisons are inconsistent, and it’s not possible distribute bonus among them, output “wrong inputs”.Sample Input:14 4 1001 2 102 3 201 3 402 4 5Sample Output:460140 120 100 100
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here