|
|
вернуться в форумWhats wrong ADMINS? program ministerstvo; var a,n,i,b,j,k,p,l:longint; s,w,q,r:string; begin readln(s); readln(w); n:=length(s); k:=length(w); i:=1; j:=1; l:=1; p:=1; while i<n do begin if s[i]<>w[j] then begin while s[p]<>w[l] do begin if s[p]=' ' then s[p]:=' ' else s[p]:='_'; p:=p+1; i:=i+1; end; end; if s[i]=w[j] then begin i:=i+1; j:=j+1; l:=j; p:=i; end; end; k:=0; for i:=1 to n do if s[i]<>'_' then k:=k+1; if k<length(w) then writeln('I HAVE FAILED!!!') else begin if w[length(w)]=s[n] then write(s[i]) else begin for i:=1 to n-1 do write(s[i]); end; end; end. |
|
|