l***n 发帖数: 37 | 1 you have n vector arrays: (1,2,3), (4,5,6), (7,8) You pick only one element
from each array. How do you generate all the permutataion of size n?
for example, output will be:
1 4 7
1 5 7
1 4 8
...
...
..
我知道怎么CODE permutation。但是具体要怎么改这个变体呢? | i***h 发帖数: 12655 | | n*s 发帖数: 752 | 3 just loop over the vector components | l*****a 发帖数: 14598 | 4 see PIE please
element
【在 l***n 的大作中提到】 : you have n vector arrays: (1,2,3), (4,5,6), (7,8) You pick only one element : from each array. How do you generate all the permutataion of size n? : for example, output will be: : 1 4 7 : 1 5 7 : 1 4 8 : ... : ... : .. : 我知道怎么CODE permutation。但是具体要怎么改这个变体呢?
| p*****2 发帖数: 21240 | |
|