Pagini recente » Cod sursa (job #2726519) | Cod sursa (job #163081) | Cod sursa (job #1632378) | Cod sursa (job #541111) | Cod sursa (job #1342715)
var a,b:string;
i,j:longint;
c:boolean;
v:array[0..1000] of longint;
begin
assign(input,'strmatch.in');
assign(output,'strmatch.out');
reset(input);
rewrite(output);
readln(a);
readln(b);
c:=true;
while c do begin
c:=false;
j:=pos(a,b);
if j>0 then begin
inc(i);
c:=true;
if i<=1000 then
v[i]:=j;
delete(b,j,1);
insert('-',b,j);
end;
end;
writeln(i);
for j:=1 to i do write(v[j],' ');
end.