Pagini recente » Cod sursa (job #1923923) | Cod sursa (job #2617220) | Cod sursa (job #1699945) | Cod sursa (job #1186221) | Cod sursa (job #125301)
Cod sursa(job #125301)
var a:array[1..36000] of string[16];
n,i,j,nr:longint;
ok:boolean;
f,g:text;
aux:char;
begin
assign(f,'restante.in'); reset(f);
assign(g,'restante.out'); rewrite(g);
readln(f,n);
for i:=1 to n do
begin
readln(f,a[i]); j:=1;
while j<length(a[i]) do
begin
if a[i][j]>a[i][j+1] then
begin
aux:=a[i][j];
a[i][j]:=a[i][j+1];
a[i][j+1]:=aux;
if j<>1 then j:=j-2;
end;
inc(j);
end;
end;
for i:=1 to n do
begin
ok:=true;
for j:=1 to n do
if j<>i then
if a[j]=a[i] then ok:=false;
if ok then inc(nr);
end;
writeln(g,nr);
close(g);
end.