for i:=0 to n do for j:=0 to m do if a[i,j]=0 then memo1.Lines.Add(inttostr(i)+' работник - '+inttostr(j)+' работа');