|
|
вернуться в форумWhy WA?Here is my program can anybody help me :( Here is my program,I have taken WA on the test of 2, I think it is correct,please tell me what is wrong,please if you can.. program fillword; var a:array[1..10] of string; b,k:array[1..100] of string; i,j,n,m,p,t:integer; ch:char; l,r:string; begin read(n,m,p); readln; for i:=1 to n do readln(a[i]); for j:=1 to p do readln(b[j]); for i:=1 to p do for j:=1 to n do if b[i]=a[j] then begin t:=t+1; k[t]:=b[i]; break; end; for i:=1 to t do begin r:=''; l:=k[i]; for ch:='A' to 'Z' do for j:=1 to m do if ch=l[j] then r:=r+ch; writeln(r); end; end. Re: Why WA?Here is my program can anybody help me :( 9 years later... >for i:=1 to p do > for j:=1 to n do I suppose, it shouldn't be to p... |
|
|