Multireference configuration interaction and perturbation theory without reduced density matrices.