More than 142 million Brazilians went to the polls Sunday in presidential and legislative elections to cap a dramatic campaign.