Pagini recente » Cod sursa (job #1249460) | Cod sursa (job #1401335) | Cod sursa (job #1862540) | Cod sursa (job #1026519) | Cod sursa (job #270512)
Cod sursa(job #270512)
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'); reset(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.