Codeforces Round #813 (Div. 2) A~C

摘要: A. Wonderful Permutation You are given a permutation p1,p2,…,pnp1,p2,…,pn of length nn and a positive integer k≤nk≤n. In one operation you can choose