P449: Enumeration of all fixed density binary lyndon words of length $n$

P449: Enumeration of all fixed density binary lyndon words of length $n$
Input:
Two integers $n$ and $d$.
Output:
All binary lyndon words of length $n$ and density $d$.
Complexity:
$O(1)$ time per solution.
Comment:
Density of binary lyndon word is the number of $1$s.
Reference:
[Sawada2013] (Bibtex)