Mai intai trebuie sa te autentifici.
Cod sursa(job #170174)
| Utilizator | Data | 2 aprilie 2008 14:31:01 | |
|---|---|---|---|
| Problema | Potrivirea sirurilor | Scor | 14 |
| Compilator | fpc | Status | done |
| Runda | Arhiva educationala | Marime | 0.51 kb |
var a,b,s:string;
n:longint;
lim,i:word;
v:array[1..1000] of longint;
f,g:text;
begin
assign(f,'strmatch.in'); reset(f);
assign(g,'strmatch.out'); rewrite(g);
readln(f,a);
read(f,b);
n:=0;
while pos(a,b)<>0 do
begin
inc(n);
if n<=1000 then v[n]:=pos(a,b);
delete(b,pos(a,b),1);
end;
writeln(g,n);
if n>1000 then lim:=1000
else lim:=n;
for i:=1 to lim do write(g,v[i],' ');
close(f); close(g);
end.
