PersonalCorpus 版 (精华区)
157589 11:41:46 8 Mar 2002
Bozhang,HIT,P.R.China 1025 Pascal Accepted 0.02 sec 49K
var
i,j,k,n:integer;
a:array[1..101] of word;
begin
readln(n);
for i:=1 to n do read(a[i]);
for i:=1 to n-1 do begin
k:=i;for j:=1+i to n do if a[j]<a[k] then k:=j;
if k<>i then begin j:=a[k]; a[k]:=a[i]; a[i]:=j end;
end;
k:=0;for i:=1 to (n div 2)+1 do k:=k+(a[i] div 2)+1;
writeln(k);
end.
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:1.885毫秒