little mistake in optimal allocation print