Resonant States in High-Temperature Superconductors with Impurities