A solvable model of a hard optimisation problem