| 记录编号 | 19662 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 382.排序工作量 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | Pascal | 运行时间 | 3.714 s | ||
| 提交时间 | 2010-10-14 20:05:28 | 内存使用 | 0.18 MiB | ||
program sort;
var
a:array[1..10000]of real;
x,n,i,j:longint;
f:text;
Begin
assign(f,'sortt.in');reset(f);
readln(f,n);
for i:=1 to n do read(f,a[i]);
close(f);
assign(f,'sortt.out');rewrite(f);
x:=0;
for i:=1 to n-1 do
for j:=i+1 to n do
if a[i]>a[j] then x:=x+1;
writeln(f,x);close(f);
end.