uses
crt;
type
sport = record
fam: array [1..3] of string;
time: array [1..3] of real;
end;
const
n = 5; {kol-wo komand}
var
i,j,k: integer;
p: sport;
sr,min: real;
a: array [1..n] of sport;
b: boolean;
begin
clrscr;
b:=true;
for i:= 1 to n do
begin
clrscr;
writeln('*** Zapis No ',i,' ***');
sr:=0;
for j:= 1 to 3 do
begin
write('wwedite familiyu: ');
readln(p.fam[j]);
write('wwedite wremya: ');
readln(p.time[j]);
sr:=sr+p.time[j];
end;
a[i]:=p;
sr:=sr/3;
if b then
begin
min:=sr;
k:=i;
end
else
if sr<min then
begin
min:=sr;
k:=i;
end;
b:=false;
end;
clrscr;
writeln('Komanda-pobeditel: ');
for i:= 1 to 3 do
writeln(a[k].fam[i]:8,' ',a[k].time[i]:6:2);
write('Srednee wremya: ',min:6:2);
readkey;
end.