var filin,filout:string;
f:text;
pod:array[1..800]of string[70];
count:array[1..800]of integer;
i,n,y:integer;
var s:string[10];
begin
assign(f,filin);
reset(f);
n:=0;y:=0;
while not eof(f) do
begin
readln(f,s);
if s=pod[n] then inc(y)
else begin
if n<>0 then count[n]:=y;
inc(n);pod[n]:=s;y:=1;
end;
end;
count[n]:=y;
close(f);
assign(f,filout);
rewrite(f);
for i:=1 to n do
writeln(f,pod[i],'-',count[i]);
close(f);
end;
var s:string[6];
t:string;
k:integer;
v:char;
begin
assign(f,filin);
reset(f);
read(f,s);
for i:=1 to n do
begin
pod[i]:='';count[i]:=0;
end;
n:=0;t:='';y:=0;
while not eof(f) do
begin
read(f,v);
if ord(v)>31 then begin
if (s<>'S21STR')and(s<>'S21ALL')
then begin
delete(s,1,1);
s:=s+v;
end
else begin
while (v<>'&')and(ord(v)>31) do
begin
if v<>'=' then t:=t+v;
read(f,v);
end;
if (n=0)and(t<>'') then begin inc(n);pod[n]:=t;count[n]:=1;end
else if t<>'' then begin
for i:=1 to n do
if pod[i]=t then begin inc(count[i]);inc(y);end;
if y=0 then begin inc(n);pod[n]:=t;count[n]:=1;end;
y:=0;
end;
s:='S21LOG';t:='';
end;
end;
end;
close(f);
for i:=1 to n do
for y:=i+1 to n do
if pod[i]>pod[y] then
begin
t:=pod[i];pod[i]:=pod[y];pod[y]:=t;
k:=count[i];count[i]:=count[y];count[y]:=k;
end;
assign(f,filout);
append(f);
for i:=1 to n do
writeln(f,pod[i],'-',count[i]);
close(f);
end;
begin
readln(filin);
readln(filout);
end.
вот но она не считает
входной файл создала...
в чем проблема??