Select-divide-and-conquer method for large-scale configuration interaction.