Pagini recente » Cod sursa (job #986833) | Cod sursa (job #2138022) | Cod sursa (job #371723) | Cod sursa (job #2390573) | 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.