Parts of Brazil have gone from a state of drought to intense flooding after torrential downpours hit southeastern areas of the country.