Comments

You should first check whether it is possible to have k free machines at the time t, and only if it is possible icrease value of servers[i]. Otherwise you are increasing value of servers[i] even though it is impossible and program are ingored.