Ground-state statistics from annealing algorithms: quantum versus classical approaches