geracao aleatoria e nearest neighbor funcionando