Left panel: Nuclear modification factors of non-prompt $\Dzero$ and $\Dplus$ mesons measured in p-Pb collisions at $\sqrt{s_{\rm NN}}$ = 5.02 TeV compared with the measurement of non-prompt J/$\psi$ at midrapidity, and the measurements of non-prompt J/$\psi$ and $\rm B^{+}$ mesons at forward and backward rapidity. The results are also compared with B-meson $\RpPb$ calculations using different nPDF sets. Right panel: $\pt$-integrated nuclear modification factor of prompt and non-prompt $\Dzero$ mesons measured in p-Pb and Pb-Pb collisions at $\snn$ = 5.02 TeV. Statistical (bars) and systematic (boxes) uncertainties are shown. Extrapolation uncertainties of non-prompt $\Dzero$ mesons in p-Pb and Pb-Pb collisions are shown separately as shaded bands.