Comprehensive study on the mass ejection and nucleosynthesis in the binary neutron star mergers leaving short-lived massive neutron stars