From 1a8e1e68759611a66ae116771da5f376c95a3b9f Mon Sep 17 00:00:00 2001 From: Raphael McSinyx Date: Sun, 12 Feb 2017 16:18:20 +0700 Subject: Update others/volume1 --- others/volume1/034.pas | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 others/volume1/034.pas (limited to 'others/volume1/034.pas') diff --git a/others/volume1/034.pas b/others/volume1/034.pas new file mode 100644 index 0000000..1e34793 --- /dev/null +++ b/others/volume1/034.pas @@ -0,0 +1,14 @@ +uses math, sortnfind; + +var + n, i: int16; + a: array of int64; + +begin + readln(n); + setlength(a, n); + for i := 0 to n - 1 do + read(a[i]); + qsort(a); + writeln(max(a[0] * a[1], a[n - 2] * a[n - 1])) +end. -- cgit 1.4.1