Load Balancer Problem

Solve another SPOJ problem based on the Greedy approach.

We'll cover the following...

Problem statement

SuperComputer Inc. has built a super-fast computer server consisting of N hyper-scalar lightning-fast processors. These processors are numbered from 1 to N and are used to process independent jobs. Every new incoming job is assigned to an arbitrary processor. Sometimes, a processor may be assigned too many jobs while other processors have a relatively light load (or even wait idly). In that case, the whole system undergoes re-balancing.

Re-balancing proceeds in ...