|
|
back to boardHELP PLEASE! WA#8! var a:array[0..25] of integer; i,j,n,m,p:integer; ch:char; begin readln(m,n,p); for i:=1 to n do begin for j:=1 to m do begin read(ch); inc(a[ord(ch)-ord('A')]); end; readln; end; for i:=1 to p do begin while not eoln do begin read(ch); dec(a[ord(ch)-ord('A')]); end; readln; end; for i:=0 to 25 do if a[i]>0 then for j:=1 to a[i] do write(chr(ord('A')+i)); end. Re: HELP PLEASE! WA#8! Posted by Oyh 19 Apr 2009 13:08 var a:array[1..26]of integer; n,m,i,j,p:integer; k:char; o:string; begin readln(n,m,p); for n:=1 to n do begin for m:=1 to m do begin read(k); i:=ord(k)-64; inc(a[i]); end; readln; end; for p:=1 to p do begin readln(o); for i:=1 to length(o) do begin j:=ord(o[i])-64; dec(a[j]); end; end; for i:=1 to 26 do if a[i]<>0 then begin for j:=1 to a[i] do write(chr(i+64)); end; end. Re: HELP PLEASE! WA#8! Posted by №Ⅰ——YDW 28 Apr 2009 11:48 good |
|
|