Added problem as a contructor parameter of Solver