about summary refs log tree commit diff
path: root/others/volume1/072.pas
diff options
context:
space:
mode:
authorRaphael McSinyx <vn.mcsinyx@gmail.com>2017-02-19 11:37:07 +0700
committerRaphael McSinyx <vn.mcsinyx@gmail.com>2017-02-19 11:37:07 +0700
commita53c4128c29f98b5fdfd9b0e13a3bbe094d975ec (patch)
tree77351187cc721bb535ffb3ff140e1355276ba8c2 /others/volume1/072.pas
parentfed71ad5b9c7e3524931b939ec369a559cf2b0b9 (diff)
downloadcp-a53c4128c29f98b5fdfd9b0e13a3bbe094d975ec.tar.gz
Update others/volume1
Diffstat (limited to 'others/volume1/072.pas')
-rw-r--r--others/volume1/072.pas24
1 files changed, 24 insertions, 0 deletions
diff --git a/others/volume1/072.pas b/others/volume1/072.pas
new file mode 100644
index 0000000..40c7ca5
--- /dev/null
+++ b/others/volume1/072.pas
@@ -0,0 +1,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.
+