The deluge left hospital rooms underwater, turned neighborhoods into islands and cut electricity to swaths of the city.