Two-machine scheduling problem C implementation