A code has to be programmed to distribute the bus among various cities to reach a destination city in such a way that the number of passengers without bus is minimum and all the buses are direct bus.
4 inputs will be given
Input 1=No of cities
Input2[i]=No of passengers in ith city
Input3=No of buses available
Input4=Max no of passengers a bus can accommodate