dimanche 2 août 2015

What`s the most performant way to iterate over all positive integer sequences `(i1, ..., id)` with `alpha <= i1 + ... + id <= beta`?

Let alpha and beta be positive integers. I want to iterate over all sequences i = (i1, ..., id) of length d of positive integers such that

alpha <= |i| := i1 + ... + id <= beta .

What`s the most performant way to do that in C++11.

Aucun commentaire:

Enregistrer un commentaire