pascal题目
pascal题目
日期:2014-01-19 11:41:35 人气:1
var a,b:array[1..1000]of longint;
i,j,k,s,n:longint;
begin
read(n);
for i:=1 to n do read(a[i]);
for i:=1 to n-1 do
for j:=1 to n-i do
if a[j]<a[j+1]then
begin k:=a[j]; a[j]:=a[j+1]; a[j+1]:=k; end;
s:=(n+1) div 2;
b[s]:=a[1]