Refactor get_most_difficult_problem