Problem Description You are given an array a1,a2,...,an(∀i∈[1,n],1≤ai≤n). Initially, each element of the array is **unique**.Moreover, there are m instructions.Each instruction is in one of the following two formats:1. (1,pos),indicating to change th…