about summary refs log tree commit diff
path: root/others/volume1/072.pas
blob: 40c7ca5907e1d52817e57169c57ed94afa101c06 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var
  n, c, i, j, idx, max, tmp: int16;

begin
  readln(n);
  max := 0;
  for i := 1 to n do
    begin
      tmp := 0;
      for j := 1 to n do
        begin
          read(c);
          if c = 1 then
            inc(tmp)
        end;
      if tmp > max then
        begin
          max := tmp;
          idx := i
        end
    end;
  writeln(idx, ' ', max)
end.