about summary refs log tree commit diff
path: root/12/TP-2008/R1/BL4.pas
diff options
context:
space:
mode:
authorRaphael McSinyx <vn.mcsinyx@gmail.com>2016-10-08 09:56:43 +0700
committerRaphael McSinyx <vn.mcsinyx@gmail.com>2016-10-08 09:56:43 +0700
commit2a7bc10f6c011d19fb3b0e73068f7e1a9c30ace0 (patch)
tree95190a32ec1c7098494849eea5a5ba6b53289585 /12/TP-2008/R1/BL4.pas
parent207cc2ae9893b0cdecd20119b9ede37f73cd4a1e (diff)
downloadcp-2a7bc10f6c011d19fb3b0e73068f7e1a9c30ace0.tar.gz
Initial commit
Diffstat (limited to '12/TP-2008/R1/BL4.pas')
-rwxr-xr-x12/TP-2008/R1/BL4.pas26
1 files changed, 26 insertions, 0 deletions
diff --git a/12/TP-2008/R1/BL4.pas b/12/TP-2008/R1/BL4.pas
new file mode 100755
index 0000000..94dd3ba
--- /dev/null
+++ b/12/TP-2008/R1/BL4.pas
@@ -0,0 +1,26 @@
+var
+  f : text;
+  n : word;
+  a, b : array of longword;
+  tmp0, tmp1 : longword;
+
+procedure ins(var l : array of longword; x : longword);
+  begin
+    setlength(l, length(l) + 1);
+    l[length(l) - 1] := x
+  end;
+
+begin
+  setlength(a, 0);
+  setlength(b, 0);
+  assign(f, 'CLB.IN');
+  reset(f);
+  readln(f, n);
+  for i := 1 to n do
+    begin
+      readln(f, tmp0, tmp1);
+      ins(a, tmp0);
+      ins(b, tmp1)
+    end;
+  close(f);
+