minimum maximum cost