K Integers

2020 VietMX 0

You are given a permutation $p_1, p_2, \ldots, p_n$. In one move you can swap two adjacent values. You want to perform a minimum number […]