POJ 2761 Feed the dogs
SRM 528 DIV 1 Medium SPartition