// output of ./demo/comb/mixedradix-fixed-content-lex-demo.cc: // Description: //% Mixed radix counting, fixed content. //% Equivalently, subsets of a multiset with a fixed number of elements. //% Lexicographic order. arg 1: 5 == n [Number of digits] default=5 arg 2: 4 == c [Content] default=4 arg 3: 3 == rr [Base (radix) of digits (0==>falling factorial, 1==>rising factorial)] default=3 args 4,5,... : [Optionally supply radix for all digits (rr ignored)] Nines: [ 2 2 2 2 2 ] 0: [ . . . 2 2 ] 0 { 3, 3, 4, 4 } 1: [ . . 1 1 2 ] 2 { 2, 3, 4, 4 } 2: [ . . 1 2 1 ] 3 { 2, 3, 3, 4 } 3: [ . . 2 . 2 ] 2 { 2, 2, 4, 4 } 4: [ . . 2 1 1 ] 3 { 2, 2, 3, 4 } 5: [ . . 2 2 . ] 3 { 2, 2, 3, 3 } 6: [ . 1 . 1 2 ] 1 { 1, 3, 4, 4 } 7: [ . 1 . 2 1 ] 3 { 1, 3, 3, 4 } 8: [ . 1 1 . 2 ] 2 { 1, 2, 4, 4 } 9: [ . 1 1 1 1 ] 3 { 1, 2, 3, 4 } 10: [ . 1 1 2 . ] 3 { 1, 2, 3, 3 } 11: [ . 1 2 . 1 ] 2 { 1, 2, 2, 4 } 12: [ . 1 2 1 . ] 3 { 1, 2, 2, 3 } 13: [ . 2 . . 2 ] 1 { 1, 1, 4, 4 } 14: [ . 2 . 1 1 ] 3 { 1, 1, 3, 4 } 15: [ . 2 . 2 . ] 3 { 1, 1, 3, 3 } 16: [ . 2 1 . 1 ] 2 { 1, 1, 2, 4 } 17: [ . 2 1 1 . ] 3 { 1, 1, 2, 3 } 18: [ . 2 2 . . ] 2 { 1, 1, 2, 2 } 19: [ 1 . . 1 2 ] 0 { 0, 3, 4, 4 } 20: [ 1 . . 2 1 ] 3 { 0, 3, 3, 4 } 21: [ 1 . 1 . 2 ] 2 { 0, 2, 4, 4 } 22: [ 1 . 1 1 1 ] 3 { 0, 2, 3, 4 } 23: [ 1 . 1 2 . ] 3 { 0, 2, 3, 3 }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