Pagini recente » Cod sursa (job #161483) | Cod sursa (job #1828670) | Cod sursa (job #2392635) | Cod sursa (job #622597) | Cod sursa (job #270631)
Cod sursa(job #270631)
var s:array[1..50000] of string;
n,i,j,p,contor:longint;
text:string;
begin
assign(input,'abc2.in'); reset(input);
assign(output,'abc2.out'); rewrite(output);
readln(text);
p:=1;
while not eof do begin
readln(s[p]);
inc(p);
end;
n:=length(s[1]);
for i:=1 to length(text) do
for j:=1 to p do if copy(text,i,n)=s[j] then inc(contor);
write(contor);
readln;
close(input); close(output);
end.