Update the solution according to the problem.