Pagini recente » Cod sursa (job #2679538) | Cod sursa (job #3152754) | Cod sursa (job #2334726) | Cod sursa (job #9906) | Cod sursa (job #98418)
Cod sursa(job #98418)
program happy1;
type vector=array [1..2500] of string[20] ;
var f,g:text;
x,i,p:longint;
j:char;
a:vector;
n,test:string[21];
function abc(n:string):boolean;
begin
abc:=false;
for i:=1 to x do
if n = a[i] then begin
abc:=true;
break;
end;
end;
begin
assign (f,'abc2.in');
reset (f);
readln (f);
x:=0;
while not eof(f) do
begin
inc(x);
readln (f,a[x]);
end;
reset(f);
for i:=1 to length(a[1]) do
begin
read (f,j);
test:=test+j;
end;
p:=0;
while NOT EOLN(F) do
begin
if abc(test) then inc(p);
delete(test,1,1);
read(f,j);
test:=test+j;
end;
close (f);
assign (g,'abc2.out');
rewrite(g);
writeln (g,p);
close (g);
end.