a:array [1..1000] of longint;
n,s,i,j,t:longint;
begin
readln(n);
for i:=1 to n do read(a[i]);
s:=0;
for i:=1 to n-1 do
for j:=i+1 to n do
if a[i]>a[j] then
s:=s+1;
t:=a[i]; a[i]:=a[j]; a[j]:=t;
end;
write(s);
end.
快速帮助 | 运行状态 | 反馈举报 | 关于我们 | 免责声明 | 浙ICP备11060257号 Processed in 0.0016 Second(s) Copyright (C) RQNOJ 2007-2019. All Rights Reserved.