ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1164. Fillword

Why WA?Here is my program can anybody help me :(
Posted by mariam kupatadze 11 Apr 2008 21:18
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 :(
Posted by anchishkin_alex 6 May 2017 22:33
9 years later...
>for i:=1 to p do
>  for j:=1 to n do
I suppose, it shouldn't be to p...