At least 18 people die and more than 40 are missing in the states of São Paulo and Rio de Janeiro.