Flooding swept away cars, submerged subway lines and grounded flights in New York and New Jersey as the remnants of Hurricane Ida brought torrential rains to the area.