From db1207e256584adcd397918a9c327aedb3b4c941 Mon Sep 17 00:00:00 2001 From: pme Date: Mon, 2 Sep 2024 01:16:36 +0200 Subject: challenge-207 --- challenge-207/peter-meszaros/perl/ch-1.pl | 69 +++++++++++++++++++++++++++++++ challenge-207/peter-meszaros/perl/ch-2.pl | 66 +++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100755 challenge-207/peter-meszaros/perl/ch-1.pl create mode 100755 challenge-207/peter-meszaros/perl/ch-2.pl diff --git a/challenge-207/peter-meszaros/perl/ch-1.pl b/challenge-207/peter-meszaros/perl/ch-1.pl new file mode 100755 index 0000000000..090e7d39f4 --- /dev/null +++ b/challenge-207/peter-meszaros/perl/ch-1.pl @@ -0,0 +1,69 @@ +#!/usr/bin/env perl +# +=head1 Task 1: Keyboard Word + +Submitted by: Mohammad S Anwar + +You are given an array of words. + +Write a script to print all the words in the given array that can be types +using alphabet on only one row of the keyboard. + +Let us assume the keys are arranged as below: + + Row 1: qwertyuiop + Row 2: asdfghjkl + Row 3: zxcvbnm + +=head2 Example 1 + + Input: @words = ("Hello","Alaska","Dad","Peace") + Output: ("Alaska","Dad") + +=head2 Example 2 + + Input: @array = ("OMG","Bye") + Output: () + +=cut + +use strict; +use warnings; +use Test2::V0 -no_srand => 1; +use Data::Dumper; +use List::Util qw/all/; + +my $cases = [ + [["Hello","Alaska","Dad","Peace"], ["Alaska","Dad"], 'Example 1'], + [["OMG","Bye"], [], 'Example 2'], +]; + +my $kbds = [ + {map {$_ => 1} qw/q w e r t y u i o p/}, + {map {$_ => 1} qw/a s d f g h j k l/}, + {map {$_ => 1} qw/z x c v b n m/}, +]; + +sub keyboard_word +{ + my $l = shift; + + my @res; + for my $w (@$l) { + my @w = map { lc } split //, $w; + for my $kbd (@$kbds) { + if (all { defined } $kbd->@{@w}) { + push @res, $w; + last; + } + } + } + return \@res; +} + +for (@$cases) { + is(keyboard_word($_->[0]), $_->[1], $_->[2]); +} +done_testing(); + +exit 0; diff --git a/challenge-207/peter-meszaros/perl/ch-2.pl b/challenge-207/peter-meszaros/perl/ch-2.pl new file mode 100755 index 0000000000..62f289ee02 --- /dev/null +++ b/challenge-207/peter-meszaros/perl/ch-2.pl @@ -0,0 +1,66 @@ +#!/usr/bin/env perl +# +=head1 Task 2: H-Index + +Submitted by: Mohammad S Anwar + +You are given an array of integers containing citations a researcher has +received for each paper. + +Write a script to compute the researcher's H-Index. For more information please +checkout the wikipedia page. + + The H-Index is the largest number h such that h articles have at least h + citations each. For example, if an author has five publications, with 9, 7, + 6, 2, and 1 citations (ordered from greatest to least), then the author's + h-index is 3, because the author has three publications with 3 or more + citations. However, the author does not have four publications with 4 or + more citations. + +=head2 Example 1 + + Input: @citations = (10,8,5,4,3) + Output: 4 + + Because the 4th publication has 4 citations and the 5th has only 3. + +=head2 Example 2 + + Input: @citations = (25,8,5,3,3) + Output: 3 + + The H-Index is 3 because the fourth paper has only 3 citations. + +=cut + +use strict; +use warnings; +use Test2::V0 -no_srand => 1; +use Data::Dumper; + +my $cases = [ + [[10, 8, 5, 4, 3], 4, 'Example 1'], + [[25, 8, 5, 3, 3], 3, 'Example 2'], +]; + +sub h_index +{ + my $l = shift; + + my $h = 0; + + for my $i (0 .. $#$l) { + if ($l->[$i] < $i) { + $h = $l->[$i-1]; + last; + } + } + return $h; +} + +for (@$cases) { + is(h_index($_->[0]), $_->[1], $_->[2]); +} +done_testing(); + +exit 0; -- cgit From c56ed0a6a4830cecd99b6d871783cab00d721d92 Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Mon, 2 Sep 2024 03:27:59 +0000 Subject: Challenge 285 Solutions (Raku) --- challenge-285/mark-anderson/raku/ch-1.raku | 10 +++++++ challenge-285/mark-anderson/raku/ch-2.raku | 45 ++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 challenge-285/mark-anderson/raku/ch-1.raku create mode 100644 challenge-285/mark-anderson/raku/ch-2.raku diff --git a/challenge-285/mark-anderson/raku/ch-1.raku b/challenge-285/mark-anderson/raku/ch-1.raku new file mode 100644 index 0000000000..b85039083a --- /dev/null +++ b/challenge-285/mark-anderson/raku/ch-1.raku @@ -0,0 +1,10 @@ +#!/usr/bin/env raku +use Test; + +is no-connection((, , )), 'A'; +is no-connection((,)), 'Z'; + +sub no-connection($routes) +{ + $routes>>[1] (-) $routes>>[0] +} diff --git a/challenge-285/mark-anderson/raku/ch-2.raku b/challenge-285/mark-anderson/raku/ch-2.raku new file mode 100644 index 0000000000..01b60b4708 --- /dev/null +++ b/challenge-285/mark-anderson/raku/ch-2.raku @@ -0,0 +1,45 @@ +#!/usr/bin/env raku +use Test; + +is making-change(9), 2; +is making-change(15), 6; +is making-change(100), 292; + +is making-change-polymod(9), 2; +is making-change-polymod(15), 6; +is making-change-polymod(100), 292; + +sub making-change($amount) +{ + .elems given gather loop (my $n = 0; $n <= $amount; $n += 5) + { + loop (my $d = 0; $d <= $amount; $d += 10) + { + last if $n + $d > $amount; + + loop (my $q = 0; $q <= $amount; $q += 25) + { + last if $d + $q > $amount; + last if $n + $d + $q > $amount; + + loop (my $h = 0; $h <= $amount; $h += 50) + { + last if $q + $h > $amount; + last if $d + $q + $h > $amount; + last if $n + $d + $q + $h > $amount; + .take + } + } + } + } +} + +# This sub is like the one above without the short circuiting. +sub making-change-polymod($amount) +{ + 1 + .elems given do for 1..3464 + { + my $p = .polymod(21,11,5,3).List; + $p if ([+] $p.head(4) Z* (5,10,25,50)) <= $amount + } +} -- cgit From f0d97c322ad8201eaf3c5a95e2fb74eba1ceaa82 Mon Sep 17 00:00:00 2001 From: Michael Manring Date: Mon, 2 Sep 2024 13:51:02 +1000 Subject: pwc285 solution in python --- challenge-285/pokgopun/python/ch-1.py | 50 +++++++++++++++++++++++ challenge-285/pokgopun/python/ch-2.py | 75 +++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 challenge-285/pokgopun/python/ch-1.py create mode 100644 challenge-285/pokgopun/python/ch-2.py diff --git a/challenge-285/pokgopun/python/ch-1.py b/challenge-285/pokgopun/python/ch-1.py new file mode 100644 index 0000000000..fcebb07e89 --- /dev/null +++ b/challenge-285/pokgopun/python/ch-1.py @@ -0,0 +1,50 @@ +### https://theweeklychallenge.org/blog/perl-weekly-challenge-285/ +""" + +Task 1: No Connection + +Submitted by: [49]Mohammad Sajid Anwar + __________________________________________________________________ + + You are given a list of routes, @routes. + + Write a script to find the destination with no further outgoing + connection. + +Example 1 + +Input: @routes = (["B","C"], ["D","B"], ["C","A"]) +Output: "A" + +"D" -> "B" -> "C" -> "A". +"B" -> "C" -> "A". +"C" -> "A". +"A". + +Example 2 + +Input: @routes = (["A","Z"]) +Output: "Z" + +Task 2: Making Change +""" +### solution by pokgopun@gmail.com + +def nc(routes: tuple): + srcs = tuple(e[0] for e in routes) + for src, dst in routes: + if dst not in srcs: + return dst + return None + +import unittest + +class TestNc(unittest.TestCase): + def test(self): + for inpt, otpt in { + (("B","C"), ("D","B"), ("C","A")): "A", + (("A","Z"),): "Z", + }.items(): + self.assertEqual(nc(inpt),otpt) + +unittest.main() diff --git a/challenge-285/pokgopun/python/ch-2.py b/challenge-285/pokgopun/python/ch-2.py new file mode 100644 index 0000000000..813b8cf378 --- /dev/null +++ b/challenge-285/pokgopun/python/ch-2.py @@ -0,0 +1,75 @@ +### https://theweeklychallenge.org/blog/perl-weekly-challenge-285/ +""" + +Task 2: Making Change + +Submitted by: [50]David Ferrone + __________________________________________________________________ + + Compute the number of ways to make change for given amount in cents. By + using the coins e.g. Penny, Nickel, Dime, Quarter and Half-dollar, in + how many distinct ways can the total value equal to the given amount? + Order of coin selection does not matter. +A penny (P) is equal to 1 cent. +A nickel (N) is equal to 5 cents. +A dime (D) is equal to 10 cents. +A quarter (Q) is equal to 25 cents. +A half-dollar (HD) is equal to 50 cents. + +Example 1 + +Input: $amount = 9 +Ouput: 2 + +1: 9P +2: N + 4P + +Example 2 + +Input: $amount = 15 +Ouput: 6 + +1: D + 5P +2: D + N +3: 3N +4: 2N + 5P +5: N + 10P +6: 15P + +Example 3 + +Input: $amount = 100 +Ouput: 292 + __________________________________________________________________ + + Last date to submit the solution 23:59 (UK Time) Sunday 8th September + 2024. + __________________________________________________________________ + +SO WHAT DO YOU THINK ? +""" +### solution by pokgopun@gmail.com + +def mc(amount: int): + c = 0 + for a50 in range(0,amount+1,50): + for a25 in range(0,amount-a50+1,25): + for a10 in range(0,amount-a50-a25+1,10): + for a5 in range(0,amount-a50-a25-a10+1,5): + for a1 in range(0,amount-a50-a25-a10-a5+1,1): + if a50 + a25 + a10 + a5 + a1 == amount: + c += 1 + return c + +import unittest + +class TestMc(unittest.TestCase): + def test(self): + for inpt, otpt in { + 9: 2, + 15: 6, + 100: 292, + }.items(): + self.assertEqual(mc(inpt),otpt) + +unittest.main() -- cgit From 6c3141c0a985d70f931356c3cdd6bd2c2e72a54d Mon Sep 17 00:00:00 2001 From: Michael Manring Date: Mon, 2 Sep 2024 14:53:44 +1000 Subject: pwc285 solution in go --- challenge-285/pokgopun/go/ch-1.go | 75 ++++++++++++++++++++++++++++++++ challenge-285/pokgopun/go/ch-2.go | 90 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 challenge-285/pokgopun/go/ch-1.go create mode 100644 challenge-285/pokgopun/go/ch-2.go diff --git a/challenge-285/pokgopun/go/ch-1.go b/challenge-285/pokgopun/go/ch-1.go new file mode 100644 index 0000000000..25e61b4565 --- /dev/null +++ b/challenge-285/pokgopun/go/ch-1.go @@ -0,0 +1,75 @@ +//# https://theweeklychallenge.org/blog/perl-weekly-challenge-285/ +/*# + +Task 1: No Connection + +Submitted by: [49]Mohammad Sajid Anwar + __________________________________________________________________ + + You are given a list of routes, @routes. + + Write a script to find the destination with no further outgoing + connection. + +Example 1 + +Input: @routes = (["B","C"], ["D","B"], ["C","A"]) +Output: "A" + +"D" -> "B" -> "C" -> "A". +"B" -> "C" -> "A". +"C" -> "A". +"A". + +Example 2 + +Input: @routes = (["A","Z"]) +Output: "Z" + +Task 2: Making Change +#*/ +//# solution by pokgopun@gmail.com + +package main + +import ( + "io" + "os" + + "github.com/google/go-cmp/cmp" +) + +type route struct { + src, dst string +} + +type routes []route + +func (rs routes) nc() string { + m := make(map[string]bool) + for _, v := range rs { + m[v.src] = false + _, ok := m[v.dst] + if !ok { + m[v.dst] = true + } + } + for k, v := range m { + if v { + return k + } + } + return "" +} + +func main() { + for _, data := range []struct { + input routes + output string + }{ + {routes{route{"B", "C"}, route{"D", "B"}, route{"C", "A"}}, "A"}, + {routes{route{"A", "Z"}}, "Z"}, + } { + io.WriteString(os.Stdout, cmp.Diff(data.input.nc(), data.output)) // blank if ok, otherwise show the difference + } +} diff --git a/challenge-285/pokgopun/go/ch-2.go b/challenge-285/pokgopun/go/ch-2.go new file mode 100644 index 0000000000..58a63ee266 --- /dev/null +++ b/challenge-285/pokgopun/go/ch-2.go @@ -0,0 +1,90 @@ +//# https://theweeklychallenge.org/blog/perl-weekly-challenge-285/ +/*# + +Task 2: Making Change + +Submitted by: [50]David Ferrone + __________________________________________________________________ + + Compute the number of ways to make change for given amount in cents. By + using the coins e.g. Penny, Nickel, Dime, Quarter and Half-dollar, in + how many distinct ways can the total value equal to the given amount? + Order of coin selection does not matter. +A penny (P) is equal to 1 cent. +A nickel (N) is equal to 5 cents. +A dime (D) is equal to 10 cents. +A quarter (Q) is equal to 25 cents. +A half-dollar (HD) is equal to 50 cents. + +Example 1 + +Input: $amount = 9 +Ouput: 2 + +1: 9P +2: N + 4P + +Example 2 + +Input: $amount = 15 +Ouput: 6 + +1: D + 5P +2: D + N +3: 3N +4: 2N + 5P +5: N + 10P +6: 15P + +Example 3 + +Input: $amount = 100 +Ouput: 292 + __________________________________________________________________ + + Last date to submit the solution 23:59 (UK Time) Sunday 8th September + 2024. + __________________________________________________________________ + +SO WHAT DO YOU THINK ? +#*/ +//# solution by pokgopun@gmail.com + +package main + +import ( + "io" + "os" + + "github.com/google/go-cmp/cmp" +) + +func mc(a int) int { + c := 0 + for c50 := range a/50 + 1 { + for c25 := range (a-50*c50)/25 + 1 { + for c10 := range (a-50*c50-25*c25)/10 + 1 { + for c5 := range (a-50*c50-25*c25-10*c10)/5 + 1 { + for c1 := range (a - 50*c50 - 25*c25 - 10*c10 - 5*c5) + 1 { + if 50*c50+25*c25+10*c10+5*c5+c1 == a { + c++ + } + } + } + } + } + } + return c +} + +func main() { + for _, data := range []struct { + input, output int + }{ + {9, 2}, + {15, 6}, + {100, 292}, + } { + io.WriteString(os.Stdout, cmp.Diff(mc(data.input), data.output)) // blank if ok, otherwise show the difference + } +} -- cgit From 5413258a14f8c6e4cf05c4bed70ee058e3a7bc11 Mon Sep 17 00:00:00 2001 From: "E. Choroba" Date: Mon, 2 Sep 2024 10:49:25 +0200 Subject: Add solutions to 285: No Connection & Making Change by E. Choroba --- challenge-285/e-choroba/perl/ch-1.pl | 16 ++++++++++++++++ challenge-285/e-choroba/perl/ch-2.pl | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 challenge-285/e-choroba/perl/ch-1.pl create mode 100755 challenge-285/e-choroba/perl/ch-2.pl diff --git a/challenge-285/e-choroba/perl/ch-1.pl b/challenge-285/e-choroba/perl/ch-1.pl new file mode 100755 index 0000000000..37cca18494 --- /dev/null +++ b/challenge-285/e-choroba/perl/ch-1.pl @@ -0,0 +1,16 @@ +#!/usr/bin/perl +use warnings; +use strict; +use experimental qw( signatures ); + +sub no_connection(@routes) { + my %nodes; + @nodes{ map @$_, @routes } = (); + delete @nodes{ map $_->[0], @routes }; + return (keys %nodes)[0] +} + +use Test::More tests => 2; + +is no_connection(['B','C'], ['D','B'], ['C','A']), 'A', 'Example 1'; +is no_connection(['A','Z']), 'Z', 'Example 2'; diff --git a/challenge-285/e-choroba/perl/ch-2.pl b/challenge-285/e-choroba/perl/ch-2.pl new file mode 100755 index 0000000000..2ddb9473ef --- /dev/null +++ b/challenge-285/e-choroba/perl/ch-2.pl @@ -0,0 +1,32 @@ +#!/usr/bin/perl +use warnings; +use strict; +use experimental qw( signatures ); + +use Memoize; +memoize qw{ making_change_rec }; + +my @coins = (1, 5, 10, 25, 50); + +sub making_change($amount) { + making_change_rec($amount, 1); +} + +sub making_change_rec($amount, $min) { + return 1 if 0 == $amount; + my $ways = 0; + { no warnings 'recursion'; + $ways += making_change_rec($amount - $_, $_) + for grep $_ >= $min && $amount >= $_, @coins; + } + return $ways +} + +use Test::More tests => 3 + 1; + +is making_change(9), 2, 'Example 1'; +is making_change(15), 6, 'Example 2'; +is making_change(100), 292, 'Example 3'; + +# Memoize needed. +is making_change(1000), 801451, 'Large'; -- cgit From 41603db88c020b22064ec84a4dec4a6f326201be Mon Sep 17 00:00:00 2001 From: deadmarshal Date: Mon, 2 Sep 2024 14:59:03 +0330 Subject: TWC285 --- challenge-285/deadmarshal/blog.txt | 1 + challenge-285/deadmarshal/java/Ch1.java | 23 ++++++++++++++++++++++ challenge-285/deadmarshal/java/Ch2.java | 16 +++++++++++++++ challenge-285/deadmarshal/modula-3/ch1/src/Ch1.m3 | 16 +++++++++++++++ .../deadmarshal/modula-3/ch1/src/m3makefile | 5 +++++ challenge-285/deadmarshal/modula-3/ch2/src/Ch2.m3 | 22 +++++++++++++++++++++ .../deadmarshal/modula-3/ch2/src/m3makefile | 5 +++++ challenge-285/deadmarshal/perl/ch-1.pl | 19 ++++++++++++++++++ challenge-285/deadmarshal/perl/ch-2.pl | 21 ++++++++++++++++++++ 9 files changed, 128 insertions(+) create mode 100644 challenge-285/deadmarshal/blog.txt create mode 100644 challenge-285/deadmarshal/java/Ch1.java create mode 100644 challenge-285/deadmarshal/java/Ch2.java create mode 100644 challenge-285/deadmarshal/modula-3/ch1/src/Ch1.m3 create mode 100644 challenge-285/deadmarshal/modula-3/ch1/src/m3makefile create mode 100644 challenge-285/deadmarshal/modula-3/ch2/src/Ch2.m3 create mode 100644 challenge-285/deadmarshal/modula-3/ch2/src/m3makefile create mode 100644 challenge-285/deadmarshal/perl/ch-1.pl create mode 100644 challenge-285/deadmarshal/perl/ch-2.pl diff --git a/challenge-285/deadmarshal/blog.txt b/challenge-285/deadmarshal/blog.txt new file mode 100644 index 0000000000..c16d550280 --- /dev/null +++ b/challenge-285/deadmarshal/blog.txt @@ -0,0 +1 @@ +https://deadmarshal.blogspot.com/2024/09/twc285.html diff --git a/challenge-285/deadmarshal/java/Ch1.java b/challenge-285/deadmarshal/java/Ch1.java new file mode 100644 index 0000000000..8b8f8229f4 --- /dev/null +++ b/challenge-285/deadmarshal/java/Ch1.java @@ -0,0 +1,23 @@ +import java.util.HashMap; +import java.util.Map; + +public class Ch1 { + public static void main(String[] args) { + String[][] arr1 = {{"B", "C"}, {"D", "B"}, {"C", "A"}}; + String[][] arr2 = {{"A", "Z"}}; + System.out.println(no_connection(arr1)); + System.out.println(no_connection(arr2)); + } + + private static String no_connection(String[][] arr) { + Map destinations = new HashMap<>(), + sources = new HashMap<>(); + for (String[] a : arr) { + sources.put(a[0], 1); + destinations.put(a[1], 1); + } + for (String d : destinations.keySet()) + if (!sources.containsKey(d)) return d; + return ""; + } +} diff --git a/challenge-285/deadmarshal/java/Ch2.java b/challenge-285/deadmarshal/java/Ch2.java new file mode 100644 index 0000000000..2763ddf32f --- /dev/null +++ b/challenge-285/deadmarshal/java/Ch2.java @@ -0,0 +1,16 @@ +public class Ch2 { + public static void main(String[] args) { + System.out.println(making_change(9)); + System.out.println(making_change(15)); + System.out.println(making_change(100)); + } + + private static int making_change(int amount) { + int[] coins = {1, 5, 10, 25, 50}; + int[] dp = new int[amount+1]; + dp[0] = 1; + for (int coin : coins) + for (int i = coin; i <= amount; ++i) dp[i] += dp[i - coin]; + return dp[amount]; + } +} diff --git a/challenge-285/deadmarshal/modula-3/ch1/src/Ch1.m3 b/challenge-285/deadmarshal/modula-3/ch1/src/Ch1.m3 new file mode 100644 index 0000000000..8f6f2ea985 --- /dev/null +++ b/challenge-285/deadmarshal/modula-3/ch1/src/Ch1.m3 @@ -0,0 +1,16 @@ +MODULE Ch1 EXPORTS Main; + +IMPORT SIO; + +VAR + A1 := ARRAY[0..2],[0..1] OF TEXT{ + ARRAY[0..1] OF TEXT{"B","C"}, + ARRAY[0..1] OF TEXT{"D","B"}, + ARRAY[0..1] OF TEXT{"C","A"}}; + A2 := ARRAY[0..0],[0..1] OF TEXT{ + ARRAY OF TEXT{"A","Z"}}; + +BEGIN + +END Ch1. + diff --git a/challenge-285/deadmarshal/modula-3/ch1/src/m3makefile b/challenge-285/deadmarshal/modula-3/ch1/src/m3makefile new file mode 100644 index 0000000000..9f66e4a51f --- /dev/null +++ b/challenge-285/deadmarshal/modula-3/ch1/src/m3makefile @@ -0,0 +1,5 @@ +import("libm3") +import("libsio") +implementation("Ch1") +program("ch1") + diff --git a/challenge-285/deadmarshal/modula-3/ch2/src/Ch2.m3 b/challenge-285/deadmarshal/modula-3/ch2/src/Ch2.m3 new file mode 100644 index 0000000000..9d1daec876 --- /dev/null +++ b/challenge-285/deadmarshal/modula-3/ch2/src/Ch2.m3 @@ -0,0 +1,22 @@ +MODULE Ch2 EXPORTS Main; + +IMPORT SIO; + +PROCEDURE MakingChange(READONLY A:CARDINAL):CARDINAL = + VAR + Coins:ARRAY[0..4] OF CARDINAL := ARRAY[0..4] OF CARDINAL{1,5,10,25,50}; + DP:REF ARRAY OF CARDINAL := NEW(REF ARRAY OF CARDINAL,A+1); + BEGIN + DP[0] := 1; + FOR I := FIRST(Coins) TO LAST(Coins) DO + FOR J := Coins[I] TO A DO INC(DP[J],DP[J-Coins[I]]) END + END; + RETURN DP[A] + END MakingChange; + +BEGIN + SIO.PutInt(MakingChange(9)); SIO.Nl(); + SIO.PutInt(MakingChange(15)); SIO.Nl(); + SIO.PutInt(MakingChange(100)); SIO.Nl() +END Ch2. + diff --git a/challenge-285/deadmarshal/modula-3/ch2/src/m3makefile b/challenge-285/deadmarshal/modula-3/ch2/src/m3makefile new file mode 100644 index 0000000000..798c627ef3 --- /dev/null +++ b/challenge-285/deadmarshal/modula-3/ch2/src/m3makefile @@ -0,0 +1,5 @@ +import("libm3") +import("libsio") +implementation("Ch2") +program("ch2") + diff --git a/challenge-285/deadmarshal/perl/ch-1.pl b/challenge-285/deadmarshal/perl/ch-1.pl new file mode 100644 index 0000000000..959064cc61 --- /dev/null +++ b/challenge-285/deadmarshal/perl/ch-1.pl @@ -0,0 +1,19 @@ +#!/usr/bin/env perl +use strict; +use warnings; + +sub no_connection{ + my ($arr) = @_; + my (%destinations,%sources); + foreach my $r(@{$arr}){ + $sources{$r->[0]} = $destinations{$r->[1]} = 1; + } + foreach my $d(keys %destinations){ + return $d unless exists $sources{$d} + } + "" +} + +printf "%s\n",no_connection([["B","C"],["D","B"],["C","A"]]); +printf "%s\n",no_connection([["A","Z"]]); + diff --git a/challenge-285/deadmarshal/perl/ch-2.pl b/challenge-285/deadmarshal/perl/ch-2.pl new file mode 100644 index 0000000000..74397ab8d8 --- /dev/null +++ b/challenge-285/deadmarshal/perl/ch-2.pl @@ -0,0 +1,21 @@ +#!/usr/bin/env perl +use strict; +use warnings; + +sub making_change{ + my ($amount) = @_; + my @coins = (1,5,10,25,50); + my @dp = (0) x ($amount+1); + $dp[0] = 1; + foreach my $c(@coins){ + foreach my $i($c..$amount) { + $dp[$i] += $dp[$i-$c] + } + } + $dp[$amount] +} + +printf "%d\n",making_change(9); +printf "%d\n",making_change(15); +printf "%d\n",making_change(100); + -- cgit From 34e50de41749881c7cf0ee5e7c7020e2cbc855d1 Mon Sep 17 00:00:00 2001 From: deadmarshal Date: Mon, 2 Sep 2024 15:17:56 +0330 Subject: Fixed Ch1.m3 file --- challenge-285/deadmarshal/modula-3/ch1/src/Ch1.m3 | 25 ++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/challenge-285/deadmarshal/modula-3/ch1/src/Ch1.m3 b/challenge-285/deadmarshal/modula-3/ch1/src/Ch1.m3 index 8f6f2ea985..0cf0ee508a 100644 --- a/challenge-285/deadmarshal/modula-3/ch1/src/Ch1.m3 +++ b/challenge-285/deadmarshal/modula-3/ch1/src/Ch1.m3 @@ -1,6 +1,6 @@ MODULE Ch1 EXPORTS Main; -IMPORT SIO; +IMPORT SIO,TextIntTbl; VAR A1 := ARRAY[0..2],[0..1] OF TEXT{ @@ -9,8 +9,27 @@ VAR ARRAY[0..1] OF TEXT{"C","A"}}; A2 := ARRAY[0..0],[0..1] OF TEXT{ ARRAY OF TEXT{"A","Z"}}; - + +PROCEDURE NoConnection(VAR A:ARRAY OF ARRAY OF TEXT):TEXT = + VAR + Destinations,Sources := NEW(TextIntTbl.Default).init(NUMBER(A)); + It:TextIntTbl.Iterator; + K:TEXT := ""; + V:INTEGER; + BEGIN + FOR I := FIRST(A) TO LAST(A) DO + EVAL Sources.put(A[I,0],1); + EVAL Destinations.put(A[I,1],1); + END; + It := Destinations.iterate(); + WHILE It.next(K,V) DO + IF Destinations.get(K,V) THEN RETURN K END + END; + RETURN "" + END NoConnection; + BEGIN - + SIO.PutText(NoConnection(A1) & "\n"); + SIO.PutText(NoConnection(A2) & "\n") END Ch1. -- cgit From c6fc6dc80f436a7427e6e7d5572f8abfc0cb4318 Mon Sep 17 00:00:00 2001 From: Mohammad Sajid Anwar Date: Mon, 2 Sep 2024 13:06:44 +0100 Subject: - Added solutions by PokGoPun. - Added solutions by Peter Meszaros. - Added solutions by Mark Anderson. - Added solutions by Ali Moradi. - Added solutions by Feng Chang. - Added solutions by E. Choroba. --- challenge-285/eric-cheung/python/ch-1.py | 12 + challenge-285/eric-cheung/python/ch-2.py | 26 + stats/pwc-challenge-207.json | 603 ++++++++++++----------- stats/pwc-challenge-284.json | 698 ++++++++++++++++++++++++++ stats/pwc-current.json | 660 ++----------------------- stats/pwc-language-breakdown-2019.json | 324 ++++++------ stats/pwc-language-breakdown-2020.json | 784 +++++++++++++++--------------- stats/pwc-language-breakdown-2021.json | 782 ++++++++++++++--------------- stats/pwc-language-breakdown-2022.json | 366 +++++++------- stats/pwc-language-breakdown-2023.json | 346 ++++++------- stats/pwc-language-breakdown-2024.json | 533 ++++++++++---------- stats/pwc-language-breakdown-summary.json | 52 +- stats/pwc-leaders.json | 394 +++++++-------- stats/pwc-summary-1-30.json | 102 ++-- stats/pwc-summary-121-150.json | 46 +- stats/pwc-summary-151-180.json | 106 ++-- stats/pwc-summary-181-210.json | 106 ++-- stats/pwc-summary-211-240.json | 52 +- stats/pwc-summary-241-270.json | 38 +- stats/pwc-summary-271-300.json | 48 +- stats/pwc-summary-301-330.json | 38 +- stats/pwc-summary-31-60.json | 86 ++-- stats/pwc-summary-61-90.json | 50 +- stats/pwc-summary-91-120.json | 42 +- stats/pwc-summary.json | 54 +- stats/pwc-yearly-language-summary.json | 148 +++--- 26 files changed, 3342 insertions(+), 3154 deletions(-) create mode 100755 challenge-285/eric-cheung/python/ch-1.py create mode 100755 challenge-285/eric-cheung/python/ch-2.py create mode 100644 stats/pwc-challenge-284.json diff --git a/challenge-285/eric-cheung/python/ch-1.py b/challenge-285/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..adfc0fa624 --- /dev/null +++ b/challenge-285/eric-cheung/python/ch-1.py @@ -0,0 +1,12 @@ + +## arrRoutes = [["B", "C"], ["D", "B"], ["C", "A"]] ## Example 1 +arrRoutes = [["A", "Z"]] ## Example 2 + +arrDest = set([arrLoop[1] for arrLoop in arrRoutes]) +arrStart = set([arrLoop[0] for arrLoop in arrRoutes]) +arrOutput = [destLoop for destLoop in arrDest if destLoop not in arrStart] + +if len(arrOutput) == 1: + print (arrOutput[0]) +else: + print (arrOutput) diff --git a/challenge-285/eric-cheung/python/ch-2.py b/challenge-285/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..633da1d0a5 --- /dev/null +++ b/challenge-285/eric-cheung/python/ch-2.py @@ -0,0 +1,26 @@ + +## Ref. +## https://www.geeksforgeeks.org/coin-change-dp-7/ + +arrTypeCoin = ["HD", "Q", "D", "N", "P"] +arrCentsVal = [50, 25, 10, 5, 1] + +## nAmount = 9 ## Example 1 +## nAmount = 15 ## Example 2 +nAmount = 100 ## Example 3 + +def GetCount(arrCoins, nCount, nSum): + + if (nSum < 0 or nCount <= 0): + return 0 + + if (nSum == 0): + return 1 + + ## GetCount is nSum of solutions + ## (i) Excluding arrCoins[nCount - 1], Target Sum: nSum + ## (ii) Including arrCoins[nCount - 1], Target Sum: nSum - arrCoins[nCount - 1] + return GetCount(arrCoins, nCount - 1, nSum) + GetCount(arrCoins, nCount, nSum - arrCoins[nCount - 1]) + +## Main Program +print (GetCount(arrCentsVal, len(arrCentsVal), nAmount)) diff --git a/stats/pwc-challenge-207.json b/stats/pwc-challenge-207.json index 47812108cf..598e8fb3e5 100644 --- a/stats/pwc-challenge-207.json +++ b/stats/pwc-challenge-207.json @@ -1,241 +1,20 @@ { - "series" : [ - { - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 207", - "data" : [ - { - "y" : 4, - "drilldown" : "Ali Moradi", - "name" : "Ali Moradi" - }, - { - "name" : "Arne Sommer", - "drilldown" : "Arne Sommer", - "y" : 3 - }, - { - "drilldown" : "Avery Adams", - "y" : 2, - "name" : "Avery Adams" - }, - { - "name" : "BarrOff", - "y" : 3, - "drilldown" : "BarrOff" - }, - { - "name" : "Bob Lied", - "drilldown" : "Bob Lied", - "y" : 3 - }, - { - "drilldown" : "Bruce Gray", - "y" : 2, - "name" : "Bruce Gray" - }, - { - "name" : "Carlos Oliveira", - "drilldown" : "Carlos Oliveira", - "y" : 2 - }, - { - "name" : "Cheok-Yin Fung", - "y" : 2, - "drilldown" : "Cheok-Yin Fung" - }, - { - "drilldown" : "Colin Crain", - "y" : 2, - "name" : "Colin Crain" - }, - { - "y" : 3, - "drilldown" : "Dave Jacoby", - "name" : "Dave Jacoby" - }, - { - "name" : "David Ferrone", - "y" : 2, - "drilldown" : "David Ferrone" - }, - { - "y" : 2, - "drilldown" : "Duncan C. White", - "name" : "Duncan C. White" - }, - { - "name" : "E. Choroba", - "drilldown" : "E. Choroba", - "y" : 2 - }, - { - "name" : "Feng Chang", - "y" : 2, - "drilldown" : "Feng Chang" - }, - { - "y" : 6, - "drilldown" : "Flavio Poletti", - "name" : "Flavio Poletti" - }, - { - "y" : 5, - "drilldown" : "Jaldhar H. Vyas", - "name" : "Jaldhar H. Vyas" - }, - { - "drilldown" : "James Smith", - "y" : 3, - "name" : "James Smith" - }, - { - "y" : 2, - "drilldown" : "Jan Krnavek", - "name" : "Jan Krnavek" - }, - { - "name" : "Jorg Sommrey", - "y" : 2, - "drilldown" : "Jorg Sommrey" - }, - { - "y" : 2, - "drilldown" : "Kjetil Skotheim", - "name" : "Kjetil Skotheim" - }, - { - "name" : "Laurent Rosenfeld", - "y" : 5, - "drilldown" : "Laurent Rosenfeld" - }, - { - "y" : 2, - "drilldown" : "Lubos Kolouch", - "name" : "Lubos Kolouch" - }, - { - "drilldown" : "Luca Ferrari", - "y" : 8, - "name" : "Luca Ferrari" - }, - { - "name" : "Mariano Spadaccini", - "y" : 2, - "drilldown" : "Mariano Spadaccini" - }, - { - "name" : "Mark Anderson", - "y" : 2, - "drilldown" : "Mark Anderson" - }, - { - "name" : "Marton Polgar", - "drilldown" : "Marton Polgar", - "y" : 2 - }, - { - "name" : "Matthew Neleigh", - "drilldown" : "Matthew Neleigh", - "y" : 2 - }, - { - "name" : "Matthias Muth", - "drilldown" : "Matthias Muth", - "y" : 3 - }, - { - "name" : "Paulo Custodio", - "y" : 2, - "drilldown" : "Paulo Custodio" - }, - { - "drilldown" : "Peter Campbell Smith", - "y" : 4, - "name" : "Peter Campbell Smith" - }, - { - "y" : 4, - "drilldown" : "Pip Stuart", - "name" : "Pip Stuart" - }, - { - "name" : "Robbie Hatley", - "drilldown" : "Robbie Hatley", - "y" : 3 - }, - { - "name" : "Robert DiCicco", - "drilldown" : "Robert DiCicco", - "y" : 4 - }, - { - "y" : 2, - "drilldown" : "Robert Ransbottom", - "name" : "Robert Ransbottom" - }, - { - "name" : "Roger Bell_West", - "drilldown" : "Roger Bell_West", - "y" : 5 - }, - { - "drilldown" : "Simon Green", - "y" : 3, - "name" : "Simon Green" - }, - { - "y" : 2, - "drilldown" : "Solathian", - "name" : "Solathian" - }, - { - "name" : "Thomas Kohler", - "drilldown" : "Thomas Kohler", - "y" : 4 - }, - { - "drilldown" : "Ulrich Rieke", - "y" : 4, - "name" : "Ulrich Rieke" - }, - { - "name" : "W. Luis Mochan", - "drilldown" : "W. Luis Mochan", - "y" : 3 - } - ] - } - ], - "xAxis" : { - "type" : "category" + "legend" : { + "enabled" : 0 }, "title" : { "text" : "The Weekly Challenge - 207" }, + "chart" : { + "type" : "column" + }, "plotOptions" : { "series" : { - "borderWidth" : 0, "dataLabels" : { "format" : "{point.y}", "enabled" : 1 - } - } - }, - "chart" : { - "type" : "column" - }, - "tooltip" : { - "pointFormat" : "{point.name}: {point.y:f}
", - "headerFormat" : "{series.name}
", - "followPointer" : 1 - }, - "subtitle" : { - "text" : "[Champions: 40] Last updated at 2024-07-29 17:29:09 GMT" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" + }, + "borderWidth" : 0 } }, "drilldown" : { @@ -269,14 +48,14 @@ "name" : "Arne Sommer" }, { + "name" : "Avery Adams", + "id" : "Avery Adams", "data" : [ [ "Perl", 2 ] - ], - "name" : "Avery Adams", - "id" : "Avery Adams" + ] }, { "data" : [ @@ -289,10 +68,12 @@ 1 ] ], - "name" : "BarrOff", - "id" : "BarrOff" + "id" : "BarrOff", + "name" : "BarrOff" }, { + "id" : "Bob Lied", + "name" : "Bob Lied", "data" : [ [ "Perl", @@ -302,9 +83,7 @@ "Blog", 1 ] - ], - "name" : "Bob Lied", - "id" : "Bob Lied" + ] }, { "data" : [ @@ -317,14 +96,14 @@ "id" : "Bruce Gray" }, { - "name" : "Carlos Oliveira", - "id" : "Carlos Oliveira", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "Carlos Oliveira", + "id" : "Carlos Oliveira" }, { "id" : "Cheok-Yin Fung", @@ -347,12 +126,12 @@ 1 ] ], - "id" : "Colin Crain", - "name" : "Colin Crain" + "name" : "Colin Crain", + "id" : "Colin Crain" }, { - "name" : "Dave Jacoby", "id" : "Dave Jacoby", + "name" : "Dave Jacoby", "data" : [ [ "Perl", @@ -365,8 +144,8 @@ ] }, { - "name" : "David Ferrone", "id" : "David Ferrone", + "name" : "David Ferrone", "data" : [ [ "Perl", @@ -381,8 +160,8 @@ 2 ] ], - "id" : "Duncan C. White", - "name" : "Duncan C. White" + "name" : "Duncan C. White", + "id" : "Duncan C. White" }, { "data" : [ @@ -395,14 +174,14 @@ "id" : "E. Choroba" }, { + "name" : "Feng Chang", + "id" : "Feng Chang", "data" : [ [ "Raku", 2 ] - ], - "name" : "Feng Chang", - "id" : "Feng Chang" + ] }, { "data" : [ @@ -419,10 +198,12 @@ 2 ] ], - "name" : "Flavio Poletti", - "id" : "Flavio Poletti" + "id" : "Flavio Poletti", + "name" : "Flavio Poletti" }, { + "id" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas", "data" : [ [ "Perl", @@ -436,13 +217,9 @@ "Blog", 1 ] - ], - "id" : "Jaldhar H. Vyas", - "name" : "Jaldhar H. Vyas" + ] }, { - "id" : "James Smith", - "name" : "James Smith", "data" : [ [ "Perl", @@ -452,17 +229,19 @@ "Blog", 1 ] - ] + ], + "name" : "James Smith", + "id" : "James Smith" }, { - "id" : "Jan Krnavek", - "name" : "Jan Krnavek", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Jan Krnavek", + "name" : "Jan Krnavek" }, { "data" : [ @@ -481,8 +260,8 @@ 2 ] ], - "id" : "Kjetil Skotheim", - "name" : "Kjetil Skotheim" + "name" : "Kjetil Skotheim", + "id" : "Kjetil Skotheim" }, { "id" : "Laurent Rosenfeld", @@ -503,8 +282,8 @@ ] }, { - "name" : "Lubos Kolouch", "id" : "Lubos Kolouch", + "name" : "Lubos Kolouch", "data" : [ [ "Perl", @@ -533,12 +312,12 @@ 2 ] ], - "name" : "Mariano Spadaccini", - "id" : "Mariano Spadaccini" + "id" : "Mariano Spadaccini", + "name" : "Mariano Spadaccini" }, { - "name" : "Mark Anderson", "id" : "Mark Anderson", + "name" : "Mark Anderson", "data" : [ [ "Raku", @@ -547,14 +326,14 @@ ] }, { - "id" : "Marton Polgar", - "name" : "Marton Polgar", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "Marton Polgar", + "id" : "Marton Polgar" }, { "id" : "Matthew Neleigh", @@ -567,6 +346,8 @@ ] }, { + "name" : "Matthias Muth", + "id" : "Matthias Muth", "data" : [ [ "Perl", @@ -576,9 +357,7 @@ "Blog", 1 ] - ], - "id" : "Matthias Muth", - "name" : "Matthias Muth" + ] }, { "name" : "Paulo Custodio", @@ -591,6 +370,8 @@ ] }, { + "id" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -600,11 +381,21 @@ "Blog", 2 ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] ], - "name" : "Peter Campbell Smith", - "id" : "Peter Campbell Smith" + "id" : "Peter Meszaros", + "name" : "Peter Meszaros" }, { + "id" : "Pip Stuart", + "name" : "Pip Stuart", "data" : [ [ "Perl", @@ -614,9 +405,7 @@ "Raku", 2 ] - ], - "id" : "Pip Stuart", - "name" : "Pip Stuart" + ] }, { "id" : "Robbie Hatley", @@ -647,18 +436,16 @@ ] }, { + "id" : "Robert Ransbottom", + "name" : "Robert Ransbottom", "data" : [ [ "Raku", 2 ] - ], - "name" : "Robert Ransbottom", - "id" : "Robert Ransbottom" + ] }, { - "id" : "Roger Bell_West", - "name" : "Roger Bell_West", "data" : [ [ "Perl", @@ -672,7 +459,9 @@ "Blog", 1 ] - ] + ], + "name" : "Roger Bell_West", + "id" : "Roger Bell_West" }, { "data" : [ @@ -685,22 +474,20 @@ 1 ] ], - "name" : "Simon Green", - "id" : "Simon Green" + "id" : "Simon Green", + "name" : "Simon Green" }, { - "id" : "Solathian", - "name" : "Solathian", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Solathian", + "id" : "Solathian" }, { - "name" : "Thomas Kohler", - "id" : "Thomas Kohler", "data" : [ [ "Perl", @@ -710,7 +497,9 @@ "Blog", 2 ] - ] + ], + "name" : "Thomas Kohler", + "id" : "Thomas Kohler" }, { "data" : [ @@ -723,8 +512,8 @@ 2 ] ], - "id" : "Ulrich Rieke", - "name" : "Ulrich Rieke" + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" }, { "id" : "W. Luis Mochan", @@ -742,7 +531,233 @@ } ] }, - "legend" : { - "enabled" : 0 + "subtitle" : { + "text" : "[Champions: 41] Last updated at 2024-09-02 12:06:08 GMT" + }, + "xAxis" : { + "type" : "category" + }, + "series" : [ + { + "name" : "The Weekly Challenge - 207", + "colorByPoint" : 1, + "data" : [ + { + "y" : 4, + "drilldown" : "Ali Moradi", + "name" : "Ali Moradi" + }, + { + "name" : "Arne Sommer", + "y" : 3, + "drilldown" : "Arne Sommer" + }, + { + "drilldown" : "Avery Adams", + "y" : 2, + "name" : "Avery Adams" + }, + { + "y" : 3, + "drilldown" : "BarrOff", + "name" : "BarrOff" + }, + { + "name" : "Bob Lied", + "y" : 3, + "drilldown" : "Bob Lied" + }, + { + "drilldown" : "Bruce Gray", + "y" : 2, + "name" : "Bruce Gray" + }, + { + "name" : "Carlos Oliveira", + "y" : 2, + "drilldown" : "Carlos Oliveira" + }, + { + "name" : "Cheok-Yin Fung", + "drilldown" : "Cheok-Yin Fung", + "y" : 2 + }, + { + "name" : "Colin Crain", + "drilldown" : "Colin Crain", + "y" : 2 + }, + { + "drilldown" : "Dave Jacoby", + "y" : 3, + "name" : "Dave Jacoby" + }, + { + "name" : "David Ferrone", + "drilldown" : "David Ferrone", + "y" : 2 + }, + { + "name" : "Duncan C. White", + "y" : 2, + "drilldown" : "Duncan C. White" + }, + { + "name" : "E. Choroba", + "drilldown" : "E. Choroba", + "y" : 2 + }, + { + "y" : 2, + "drilldown" : "Feng Chang", + "name" : "Feng Chang" + }, + { + "y" : 6, + "drilldown" : "Flavio Poletti", + "name" : "Flavio Poletti" + }, + { + "y" : 5, + "drilldown" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas" + }, + { + "drilldown" : "James Smith", + "y" : 3, + "name" : "James Smith" + }, + { + "y" : 2, + "drilldown" : "Jan Krnavek", + "name" : "Jan Krnavek" + }, + { + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey", + "y" : 2 + }, + { + "name" : "Kjetil Skotheim", + "drilldown" : "Kjetil Skotheim", + "y" : 2 + }, + { + "name" : "Laurent Rosenfeld", + "y" : 5, + "drilldown" : "Laurent Rosenfeld" + }, + { + "drilldown" : "Lubos Kolouch", + "y" : 2, + "name" : "Lubos Kolouch" + }, + { + "name" : "Luca Ferrari", + "y" : 8, + "drilldown" : "Luca Ferrari" + }, + { + "name" : "Mariano Spadaccini", + "drilldown" : "Mariano Spadaccini", + "y" : 2 + }, + { + "y" : 2, + "drilldown" : "Mark Anderson", + "name" : "Mark Anderson" + }, + { + "name" : "Marton Polgar", + "drilldown" : "Marton Polgar", + "y" : 2 + }, + { + "drilldown" : "Matthew Neleigh", + "y" : 2, + "name" : "Matthew Neleigh" + }, + { + "y" : 3, + "drilldown" : "Matthias Muth", + "name" : "Matthias Muth" + }, + { + "name" : "Paulo Custodio", + "drilldown" : "Paulo Custodio", + "y" : 2 + }, + { + "name" : "Peter Campbell Smith", + "y" : 4, + "drilldown" : "Peter Campbell Smith" + }, + { + "name" : "Peter Meszaros", + "drilldown" : "Peter Meszaros", + "y" : 2 + }, + { + "y" : 4, + "drilldown" : "Pip Stuart", + "name" : "Pip Stuart" + }, + { + "drilldown" : "Robbie Hatley", + "y" : 3, + "name" : "Robbie Hatley" + }, + { + "drilldown" : "Robert DiCicco", + "y" : 4, + "name" : "Robert DiCicco" + }, + { + "name" : "Robert Ransbottom", + "drilldown" : "Robert Ransbottom", + "y" : 2 + }, + { + "y" : 5, + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West" + }, + { + "name" : "Simon Green", + "drilldown" : "Simon Green", + "y" : 3 + }, + { + "name" : "Solathian", + "drilldown" : "Solathian", + "y" : 2 + }, + { + "y" : 4, + "drilldown" : "Thomas Kohler", + "name" : "Thomas Kohler" + }, + { + "drilldown" : "Ulrich Rieke", + "y" : 4, + "name" : "Ulrich Rieke" + }, + { + "name" : "W. Luis Mochan", + "drilldown" : "W. Luis Mochan", + "y" : 3 + } + ] + } + ], + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "tooltip" : { + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1, + "headerFormat" : "{series.name}
" } } diff --git a/stats/pwc-challenge-284.json b/stats/pwc-challenge-284.json new file mode 100644 index 0000000000..55940f5ca3 --- /dev/null +++ b/stats/pwc-challenge-284.json @@ -0,0 +1,698 @@ +{ + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, + "series" : [ + { + "name" : "The Weekly Challenge - 284", + "data" : [ + { + "y" : 3, + "drilldown" : "Ali Moradi", + "name" : "Ali Moradi" + }, + { + "drilldown" : "Andrew Schneider", + "y" : 2, + "name" : "Andrew Schneider" + }, + { + "drilldown" : "Arne Sommer", + "y" : 3, + "name" : "Arne Sommer" + }, + { + "name" : "Athanasius", + "y" : 4, + "drilldown" : "Athanasius" + }, + { + "name" : "BarrOff", + "drilldown" : "BarrOff", + "y" : 1 + }, + { + "name" : "Bob Lied", + "y" : 2, + "drilldown" : "Bob Lied" + }, + { + "y" : 2, + "drilldown" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung" + }, + { + "drilldown" : "Dave Jacoby", + "y" : 2, + "name" : "Dave Jacoby" + }, + { + "name" : "David Ferrone", + "y" : 2, + "drilldown" : "David Ferrone" + }, + { + "name" : "E. Choroba", + "drilldown" : "E. Choroba", + "y" : 2 + }, + { + "name" : "Feng Chang", + "y" : 2, + "drilldown" : "Feng Chang" + }, + { + "name" : "Jaldhar H. Vyas", + "drilldown" : "Jaldhar H. Vyas", + "y" : 5 + }, + { + "drilldown" : "Jan Krnavek", + "y" : 2, + "name" : "Jan Krnavek" + }, + { + "y" : 3, + "drilldown" : "Jorg Sommrey", + "name" : "Jorg Sommrey" + }, + { + "drilldown" : "Kjetil Skotheim", + "y" : 2, + "name" : "Kjetil Skotheim" + }, + { + "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld", + "y" : 6 + }, + { + "drilldown" : "Mariano Ortega", + "y" : 2, + "name" : "Mariano Ortega" + }, + { + "name" : "Mariano Spadaccini", + "drilldown" : "Mariano Spadaccini", + "y" : 2 + }, + { + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson", + "y" : 2 + }, + { + "name" : "Matthew Neleigh", + "drilldown" : "Matthew Neleigh", + "y" : 2 + }, + { + "name" : "Matthias Muth", + "y" : 3, + "drilldown" : "Matthias Muth" + }, + { + "drilldown" : "Nelo Tovar", + "y" : 2, + "name" : "Nelo Tovar" + }, + { + "drilldown" : "Niels van Dijke", + "y" : 2, + "name" : "Niels van Dijke" + }, + { + "name" : "Packy Anderson", + "y" : 5, + "drilldown" : "Packy Anderson" + }, + { + "y" : 2, + "drilldown" : "Paulo Custodio", + "name" : "Paulo Custodio" + }, + { + "name" : "Peter Campbell Smith", + "y" : 3, + "drilldown" : "Peter Campbell Smith" + }, + { + "name" : "Peter Meszaros", + "drilldown" : "Peter Meszaros", + "y" : 2 + }, + { + "drilldown" : "Reinier Maliepaard", + "y" : 3, + "name" : "Reinier Maliepaard" + }, + { + "y" : 3, + "drilldown" : "Robbie Hatley", + "name" : "Robbie Hatley" + }, + { + "name" : "Robert Ransbottom", + "y" : 2, + "drilldown" : "Robert Ransbottom" + }, + { + "drilldown" : "Roger Bell_West", + "y" : 5, + "name" : "Roger Bell_West" + }, + { + "name" : "Simon Green", + "drilldown" : "Simon Green", + "y" : 3 + }, + { + "name" : "Thomas Kohler", + "drilldown" : "Thomas Kohler", + "y" : 4 + }, + { + "y" : 2, + "drilldown" : "Tim King", + "name" : "Tim King" + }, + { + "name" : "Torgny Lyon", + "y" : 2, + "drilldown" : "Torgny Lyon" + }, + { + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke", + "y" : 4 + }, + { + "name" : "W. Luis Mochan", + "y" : 3, + "drilldown" : "W. Luis Mochan" + }, + { + "name" : "Wanderdoc", + "drilldown" : "Wanderdoc", + "y" : 2 + } + ], + "colorByPoint" : 1 + } + ], + "tooltip" : { + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1, + "headerFormat" : "{series.name}
" + }, + "legend" : { + "enabled" : 0 + }, + "drilldown" : { + "series" : [ + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Ali Moradi", + "name" : "Ali Moradi" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Andrew Schneider", + "name" : "Andrew Schneider" + }, + { + "name" : "Arne Sommer", + "id" : "Arne Sommer", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "id" : "Athanasius", + "name" : "Athanasius" + }, + { + "name" : "BarrOff", + "id" : "BarrOff", + "data" : [ + [ + "Raku", + 1 + ] + ] + }, + { + "name" : "Bob Lied", + "id" : "Bob Lied", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung" + }, + { + "id" : "Dave Jacoby", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Dave Jacoby" + }, + { + "id" : "David Ferrone", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "David Ferrone" + }, + { + "name" : "E. Choroba", + "id" : "E. Choroba", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Feng Chang", + "name" : "Feng Chang" + }, + { + "id" : "Jaldhar H. Vyas", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Jaldhar H. Vyas" + }, + { + "id" : "Jan Krnavek", + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Jan Krnavek" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey" + }, + { + "name" : "Kjetil Skotheim", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Kjetil Skotheim" + }, + { + "name" : "Laurent Rosenfeld", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 2 + ] + ], + "id" : "Laurent Rosenfeld" + }, + { + "name" : "Mariano Ortega", + "id" : "Mariano Ortega", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "id" : "Mariano Spadaccini", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Mariano Spadaccini" + }, + { + "name" : "Mark Anderson", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Mark Anderson" + }, + { + "id" : "Matthew Neleigh", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Matthew Neleigh" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Matthias Muth", + "name" : "Matthias Muth" + }, + { + "name" : "Nelo Tovar", + "id" : "Nelo Tovar", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Niels van Dijke", + "id" : "Niels van Dijke", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Packy Anderson", + "name" : "Packy Anderson" + }, + { + "id" : "Paulo Custodio", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Paulo Custodio" + }, + { + "id" : "Peter Campbell Smith", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Peter Campbell Smith" + }, + { + "id" : "Peter Meszaros", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Peter Meszaros" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Reinier Maliepaard", + "name" : "Reinier Maliepaard" + }, + { + "id" : "Robbie Hatley", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Robbie Hatley" + }, + { + "name" : "Robert Ransbottom", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Robert Ransbottom" + }, + { + "id" : "Roger Bell_West", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", +