The answer is to first write a function that given an integer k in [0, n!) returns the kth permutation: def unrank(n, k): pi = np.arange(n) ...
確定! 回上一頁