Greedy method for multi-machine scheduling problem