Marx2002 2016-08-01 21:24:18
点我顶贴
收藏
删除
var n,m,i,j,k,s,ans:longint;
a:array [0..100,0..100] of longint;
begin
readln(n,m);
for i:=1 to n do
for j:=1 to m do
read(a[i,j]);
for i:=1 to n do
for j:=1 to m do
begin
s:=0;
for k:=1 to m do
if a[i,k]=1 then inc(s);
for k:=1 to n do
if a[k,j]=1 then inc(s);
if s>ans then ans:=s;
end;
write(ans);
end.