finish the cuttingRod problem