Effects of resonant and continuum states on the neutrino-nucleus cross section