Permutations

2020 VietMX 0

You are given a permutation p of numbers 1, 2, …, n. Let’s define f(p) as the following sum: Find the lexicographically m-th permutation of length n in the set of permutations having the maximum possible […]

Petr and Permutations

2020 VietMX 0

Petr likes to come up with problems about randomly generated data. This time problem is about random permutation. He decided to generate a random permutation […]