returns the k-th lexicographically smallest permutation of size n 0-th permutation is the unit permutation i.e. 0, 1, 2, .... n-1
| 38 | // returns the k-th lexicographically smallest permutation of size n |
| 39 | // 0-th permutation is the unit permutation i.e. 0, 1, 2, .... n-1 |
| 40 | vector<int> kth_perm(int n, int k) { // k < n! |
| 41 | return get_perm(n, decimal_to_factoradic(k)); |
| 42 | } |
| 43 | vector<int> factoradic_order(vector<int> p) { |
| 44 | o_set<int> se; |
| 45 | int n = p.size(); |
nothing calls this directly
no test coverage detected