From ce56bd193a7c8c6437443227cd3abb51134e3e7a Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Mon, 14 Jan 2019 20:41:09 +0700 Subject: At least I managed to stay in top 10% --- codechef/xypizq.p6 | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 codechef/xypizq.p6 (limited to 'codechef/xypizq.p6') diff --git a/codechef/xypizq.p6 b/codechef/xypizq.p6 new file mode 100755 index 0000000..ff0598f --- /dev/null +++ b/codechef/xypizq.p6 @@ -0,0 +1,6 @@ +#!/usr/bin/env perl6 +multi xypizq($N, 1, $x, $y, $z where $x == $z) { $x / ($N * 2 + 1) } +multi xypizq($N, 1, $x, $y, $z) { 1 - xypizq $N, 1, $z, $y, $z } +multi xypizq($N, 3, $x, $y, $z) { xypizq $N, 1, $z, $y, $x } +multi xypizq($N, $t, $x, $y, $z) { 1 - $y * 2 / ($N * 2 + 1) } +xypizq(|get.words>>.Int).nude.put for ^get -- cgit 1.4.1