  A measurement of the lifetimes of the $\Omega^{0}_{c}$ and $\Xi^{0}_{c}$
baryons is reported using proton-proton collision data at a centre-of-mass
energy of $13\text{ TeV}$, corresponding to an integrated luminosity of
$5.4\text{ fb}^{-1}$ collected by the LHCb experiment. The $\Omega^{0}_{c}$ and
$\Xi^{0}_{c}$ baryons are produced directly from proton interactions and
reconstructed in the $pK^{-}K^{-}\pi^{+}$ final state. The $\Omega^{0}_{c}$
lifetime is measured to be $276.5\pm13.4\pm4.4\pm0.7\text{ fs}$, and the
$\Xi^{0}_{c}$ lifetime is measured to be $148.0\pm2.3\pm2.2\pm0.2\text{ fs}$,
where the first uncertainty is statistical, the second systematic, and the
third due to the uncertainty on the $D^{0}$ lifetime. These results confirm
previous LHCb measurements based on semileptonic beauty-hadron decays, which
disagree with earlier results of a four times shorter $\Omega^{0}_{c}$
lifetime, and provide the single most precise measurement of the
$\Omega^{0}_{c}$ lifetime.
