Company: Citadel_19sep
Difficulty: medium
Minimum Operations to Execute Jobs Problem Description A processor holds a pool of n jobs. Job i needs executionTime[i] seconds of execution in total. The processor works in operations . In one operation it selects exactly one job that is still in the pool as the major job. The major job receives x seconds of execution in that operation, and every other job still in the pool receives y seconds, where y < x . The major job receives only x seconds, not x + y . A job is complete as soon as the total execution it has received is at least executionTime[i] seconds. A completed job leaves the pool immediately and takes no part in later operations. Complete the function getMinumumOperations(executionTime, x, y) , which returns the minimum number of operations needed to complete all n jobs when the major job of every operation is chosen optimally. Input Format Read from standard input. n executionTime[0] executionTime[1] ... executionTime[n-1] x y The first line contains an integer n , the n