Heavy flooding has left at least 18 people dead and more than 280 injured in the northeast region of Brazil, officials say.