Optimized problems 10 and 12.