Monte Carlo study of the exchange bias and the training effect in nanoparticles with core/shell morphology