  The Quantum Monte Carlo (QMC) method can yield the imaginary-time dependence
of a correlation function $C(\tau)$ of an operator $\hat O$. The analytic
continuation to real-time proceeds by means of a "numerical inversion" of these
data to find the response function or spectral density $A(\omega)$
corresponding to $\hat O$. Such a technique is very sensitive to the
statistical errors in $C(\tau)$ especially for large values of $\tau$, when we
are interested in the low-energy excitations. In this paper, we find that if we
use the flat histogram technique in the QMC method, in such a way to make the
{\it histogram of} $C(\tau)$ flat, the results of the analytic continuation for
low-energy excitations improve using the same amount of computational time. To
demonstrate the idea we select an exactly soluble version of the single-hole
motion in the $t-J$ model and the diagrammatic Monte Carlo technique.
