which of the following conditions is the optimal solution to the newsvendor problem, where q is the quantity to be purchased, and d is demand?