这是一道置换群的裸题=-=,先拿来试试手对着打,以后应该会更加熟练吧! ; var n,i,j,maxx,minx,now,len,cursum,tmin,sum:longint; p:array[..maxn] of boolean; agr,pos:array[..maxn] of longint; function min(a,b:longint):longint; begin if a>b then exit(b) else exit(a); end; begin readln(n);…