For a task i, it takes one day to start a job, and ki days to complete. For given n tasks, schedule it effectively such that it takes min days to complete