aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-343/conor-hoekstra/ch-1.cu5
-rw-r--r--challenge-343/conor-hoekstra/ch-2.cu6
2 files changed, 11 insertions, 0 deletions
diff --git a/challenge-343/conor-hoekstra/ch-1.cu b/challenge-343/conor-hoekstra/ch-1.cu
new file mode 100644
index 0000000000..3a678e2acc
--- /dev/null
+++ b/challenge-343/conor-hoekstra/ch-1.cu
@@ -0,0 +1,5 @@
+// Parrot: https://nvlabs.github.io/parrot
+
+auto zero_friend(auto arr) { //
+ return (arr - 0).abs().minr();
+}
diff --git a/challenge-343/conor-hoekstra/ch-2.cu b/challenge-343/conor-hoekstra/ch-2.cu
new file mode 100644
index 0000000000..2ec7d74781
--- /dev/null
+++ b/challenge-343/conor-hoekstra/ch-2.cu
@@ -0,0 +1,6 @@
+// Parrot: https://nvlabs.github.io/parrot
+
+auto team_champion(auto arr) {
+ auto sums = arr.sum(2_ic);
+ return (sums.maxr() == sums).where().front() - 1;
+}