Mean light curves of long-period variables and discrimination between carbon- and oxygen-rich stars