Type : Greedy

This is a classical problem about n machine consistently handling m jobs.
Let, packing the i-th pizza takes ai unit time and the delivery time is equal to bi.
Now, Look for the smallest among the numbers ai and bi (i=1,n). If the lowest value is ai then put the i-th pizza for processing first, if bi the latter. Then remove the i-th pizza from the list, repeat this process for the remaining (n-1)th pizza.
Note that the chef will not wait if the delivery time is longer for the i-th pizza.
Soln : http://paste.ubuntu.com/24900522/

Statistics

28% Solution Ratio
khatribiruEarliest, Jun '17
khatribiruFastest, 0.0s
khatribiruLightest, 131 kB
hbb_fanShortest, 650B
Toph uses cookies. By continuing you agree to our Cookie Policy.