Pagini recente » Cod sursa (job #3276253) | Cod sursa (job #659279) | Cod sursa (job #3176641) | Cod sursa (job #1056624) | 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.