diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2024-02-25 22:58:22 +0000 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2024-02-25 22:58:22 +0000 |
| commit | 971ad418c9418efd9eb105cd114387f5ce59d6be (patch) | |
| tree | 577078f0f387ff624f28c068c45c5c592444717e | |
| parent | 46c118b0d156324f0af98c853a401e9fb8fed24f (diff) | |
| download | perlweeklychallenge-club-971ad418c9418efd9eb105cd114387f5ce59d6be.tar.gz perlweeklychallenge-club-971ad418c9418efd9eb105cd114387f5ce59d6be.tar.bz2 perlweeklychallenge-club-971ad418c9418efd9eb105cd114387f5ce59d6be.zip | |
- Added solutions by Jan Krnavek.
- Added solutions by Arne Sommer.
- Added solutions by Bruce Gray.
- Added solutions by W. Luis Mochan.
- Added solutions by Laurent Rosenfeld.
| -rw-r--r-- | challenge-257/laurent-rosenfeld/blog1.txt | 1 | ||||
| -rw-r--r-- | challenge-257/laurent-rosenfeld/raku/ch-2.raku | 40 | ||||
| -rw-r--r-- | stats/pwc-current.json | 397 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 58 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 1556 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 372 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 106 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 112 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 118 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 42 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 56 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 96 | ||||
| -rw-r--r-- | stats/pwc-summary-271-300.json | 38 | ||||
| -rw-r--r-- | stats/pwc-summary-301-330.json | 38 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 124 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 46 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 46 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 46 |
18 files changed, 1691 insertions, 1601 deletions
diff --git a/challenge-257/laurent-rosenfeld/blog1.txt b/challenge-257/laurent-rosenfeld/blog1.txt new file mode 100644 index 0000000000..904b9b2bd6 --- /dev/null +++ b/challenge-257/laurent-rosenfeld/blog1.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2024/02/perl-weekly-challenge-257-reduced-row-echelon.html diff --git a/challenge-257/laurent-rosenfeld/raku/ch-2.raku b/challenge-257/laurent-rosenfeld/raku/ch-2.raku new file mode 100644 index 0000000000..ad179731e8 --- /dev/null +++ b/challenge-257/laurent-rosenfeld/raku/ch-2.raku @@ -0,0 +1,40 @@ +sub is-first-echelon (@mat) { + my @leading; + for 0..@mat.end -> $i { + my @row = |@mat[$i]; + for 0..@row.end -> $j { + next if @row[$j] == 0; + if @row[$j] == 1 { + @leading[$i] = $j; + last; + } else { + } + } + @leading[$i] = Inf unless defined @leading[$i]; + } + return False unless [<] grep { $_ < Inf }, @leading; # rules 2 and 3 + return False unless [<=] @leading; + for 0..@leading.end -> $i { + last if @leading[$i] == Inf; + next unless defined @leading[$i]; + for 0..@mat.end -> $k { + next if $i == @leading[$k]; + return False if @mat[$k][$i] != 0; + } + } + return True; +} + +my @tests = + [ [1,0,0,1], [0,1,0,2], [0,0,1,3]], + [ [1, 1, 0], [0, 1, 0], [0, 0, 0]], + [ [0, 1,-2, 0, 1], [0, 0, 0, 1, 3], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]], + [ [1, 0, 0, 4], [0, 1, 0, 7], [0, 0, 1,-1]], + [ [0, 1,-2, 0, 1], [0, 0, 0, 0, 0], [0, 0, 0, 1, 3], [0, 0, 0, 0, 0]], + [ [0, 1, 0], [1, 0, 0], [0, 0, 0]], + [ [4, 0, 0, 0], [0, 1, 0, 7], [0, 0, 1,-1]]; + +for @tests -> @test { + printf "%-20s => ", "@test[0] ..."; + say is-first-echelon @test; +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index b92382b9eb..8b21bb2184 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,142 +1,51 @@ { - "series" : [ - { - "colorByPoint" : 1, - "data" : [ - { - "name" : "Athanasius", - "y" : 4, - "drilldown" : "Athanasius" - }, - { - "drilldown" : "Bob Lied", - "y" : 2, - "name" : "Bob Lied" - }, - { - "name" : "Dave Jacoby", - "drilldown" : "Dave Jacoby", - "y" : 3 - }, - { - "drilldown" : "David Ferrone", - "y" : 2, - "name" : "David Ferrone" - }, - { - "drilldown" : "E. Choroba", - "y" : 2, - "name" : "E. Choroba" - }, - { - "name" : "Jorg Sommrey", - "y" : 3, - "drilldown" : "Jorg Sommrey" - }, - { - "name" : "Laurent Rosenfeld", - "y" : 3, - "drilldown" : "Laurent Rosenfeld" - }, - { - "y" : 4, - "drilldown" : "Lubos Kolouch", - "name" : "Lubos Kolouch" - }, - { - "drilldown" : "Luca Ferrari", - "y" : 11, - "name" : "Luca Ferrari" - }, - { - "drilldown" : "Mariano Spadaccini", - "y" : 1, - "name" : "Mariano Spadaccini" - }, - { - "name" : "Mark Anderson", - "drilldown" : "Mark Anderson", - "y" : 2 - }, - { - "name" : "Matthew Neleigh", - "drilldown" : "Matthew Neleigh", - "y" : 2 - }, - { - "name" : "Nelo Tovar", - "drilldown" : "Nelo Tovar", - "y" : 2 - }, - { - "drilldown" : "Peter Campbell Smith", - "y" : 3, - "name" : "Peter Campbell Smith" - }, - { - "name" : "Peter Meszaros", - "y" : 2, - "drilldown" : "Peter Meszaros" - }, - { - "drilldown" : "Robbie Hatley", - "y" : 1, - "name" : "Robbie Hatley" - }, - { - "name" : "Roger Bell_West", - "y" : 5, - "drilldown" : "Roger Bell_West" - }, - { - "name" : "Simon Green", - "y" : 3, - "drilldown" : "Simon Green" - }, - { - "drilldown" : "Thomas Kohler", - "y" : 4, - "name" : "Thomas Kohler" - }, - { - "name" : "Ulrich Rieke", - "drilldown" : "Ulrich Rieke", - "y" : 3 - }, - { - "name" : "W. Luis Mochan", - "drilldown" : "W. Luis Mochan", - "y" : 3 - } - ], - "name" : "The Weekly Challenge - 257" - } - ], - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } + "xAxis" : { + "type" : "category" }, - "chart" : { - "type" : "column" + "tooltip" : { + "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>", + "followPointer" : 1 }, - "title" : { - "text" : "The Weekly Challenge - 257" + "subtitle" : { + "text" : "[Champions: 24] Last updated at 2024-02-25 22:53:13 GMT" }, - "xAxis" : { - "type" : "category" + "chart" : { + "type" : "column" }, "legend" : { "enabled" : 0 }, - "tooltip" : { - "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", - "followPointer" : 1, - "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } + }, + "title" : { + "text" : "The Weekly Challenge - 257" }, "drilldown" : { "series" : [ { + "id" : "Arne Sommer", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Arne Sommer" + }, + { + "id" : "Athanasius", "data" : [ [ "Perl", @@ -147,20 +56,30 @@ 2 ] ], - "name" : "Athanasius", - "id" : "Athanasius" + "name" : "Athanasius" }, { + "name" : "Bob Lied", "data" : [ [ "Perl", 2 ] ], - "id" : "Bob Lied", - "name" : "Bob Lied" + "id" : "Bob Lied" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Bruce Gray", + "id" : "Bruce Gray" }, { + "id" : "Dave Jacoby", "data" : [ [ "Perl", @@ -171,18 +90,17 @@ 1 ] ], - "name" : "Dave Jacoby", - "id" : "Dave Jacoby" + "name" : "Dave Jacoby" }, { + "id" : "David Ferrone", + "name" : "David Ferrone", "data" : [ [ "Perl", 2 ] - ], - "name" : "David Ferrone", - "id" : "David Ferrone" + ] }, { "data" : [ @@ -195,6 +113,17 @@ "id" : "E. Choroba" }, { + "name" : "Jan Krnavek", + "data" : [ + [ + "Raku", + 1 + ] + ], + "id" : "Jan Krnavek" + }, + { + "id" : "Jorg Sommrey", "data" : [ [ "Perl", @@ -205,10 +134,11 @@ 1 ] ], - "id" : "Jorg Sommrey", "name" : "Jorg Sommrey" }, { + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -216,18 +146,17 @@ ], [ "Raku", - 1 + 2 ], [ "Blog", - 1 + 2 ] - ], - "id" : "Laurent Rosenfeld", - "name" : "Laurent Rosenfeld" + ] }, { "id" : "Lubos Kolouch", + "name" : "Lubos Kolouch", "data" : [ [ "Perl", @@ -237,10 +166,10 @@ "Raku", 2 ] - ], - "name" : "Lubos Kolouch" + ] }, { + "id" : "Luca Ferrari", "name" : "Luca Ferrari", "data" : [ [ @@ -251,8 +180,7 @@ "Blog", 9 ] - ], - "id" : "Luca Ferrari" + ] }, { "data" : [ @@ -281,20 +209,21 @@ 2 ] ], - "id" : "Matthew Neleigh", - "name" : "Matthew Neleigh" + "name" : "Matthew Neleigh", + "id" : "Matthew Neleigh" }, { "id" : "Nelo Tovar", + "name" : "Nelo Tovar", "data" : [ [ "Perl", 2 ] - ], - "name" : "Nelo Tovar" + ] }, { + "name" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -305,18 +234,17 @@ 1 ] ], - "id" : "Peter Campbell Smith", - "name" : "Peter Campbell Smith" + "id" : "Peter Campbell Smith" }, { + "id" : "Peter Meszaros", "data" : [ [ "Perl", 2 ] ], - "name" : "Peter Meszaros", - "id" : "Peter Meszaros" + "name" : "Peter Meszaros" }, { "id" : "Robbie Hatley", @@ -347,7 +275,6 @@ "id" : "Roger Bell_West" }, { - "id" : "Simon Green", "data" : [ [ "Perl", @@ -358,9 +285,12 @@ 1 ] ], - "name" : "Simon Green" + "name" : "Simon Green", + "id" : "Simon Green" }, { + "id" : "Thomas Kohler", + "name" : "Thomas Kohler", "data" : [ [ "Perl", @@ -370,9 +300,7 @@ "Blog", 2 ] - ], - "name" : "Thomas Kohler", - "id" : "Thomas Kohler" + ] }, { "data" : [ @@ -385,10 +313,12 @@ 1 ] ], - "id" : "Ulrich Rieke", - "name" : "Ulrich Rieke" + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" }, { + "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -398,22 +328,141 @@ "Blog", 1 ] - ], - "name" : "W. Luis Mochan", - "id" : "W. Luis Mochan" + ] } ] }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - }, - "borderWidth" : 0 + "series" : [ + { + "name" : "The Weekly Challenge - 257", + "colorByPoint" : 1, + "data" : [ + { + "drilldown" : "Arne Sommer", + "y" : 3, + "name" : "Arne Sommer" + }, + { + "drilldown" : "Athanasius", + "y" : 4, + "name" : "Athanasius" + }, + { + "y" : 2, + "drilldown" : "Bob Lied", + "name" : "Bob Lied" + }, + { + "drilldown" : "Bruce Gray", + "y" : 2, + "name" : "Bruce Gray" + }, + { + "name" : "Dave Jacoby", + "drilldown" : "Dave Jacoby", + "y" : 3 + }, + { + "y" : 2, + "drilldown" : "David Ferrone", + "name" : "David Ferrone" + }, + { + "name" : "E. Choroba", + "y" : 2, + "drilldown" : "E. Choroba" + }, + { + "y" : 1, + "drilldown" : "Jan Krnavek", + "name" : "Jan Krnavek" + }, + { + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey", + "y" : 3 + }, + { + "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld", + "y" : 5 + }, + { + "drilldown" : "Lubos Kolouch", + "y" : 4, + "name" : "Lubos Kolouch" + }, + { + "name" : "Luca Ferrari", + "y" : 11, + "drilldown" : "Luca Ferrari" + }, + { + "name" : "Mariano Spadaccini", + "y" : 1, + "drilldown" : "Mariano Spadaccini" + }, + { + "name" : "Mark Anderson", + "y" : 2, + "drilldown" : "Mark Anderson" + }, + { + "drilldown" : "Matthew Neleigh", + "y" : 2, + "name" : "Matthew Neleigh" + }, + { + "name" : "Nelo Tovar", + "drilldown" : "Nelo Tovar", + "y" : 2 + }, + { + "name" : "Peter Campbell Smith", + "drilldown" : "Peter Campbell Smith", + "y" : 3 + }, + { + "y" : 2, + "drilldown" : "Peter Meszaros", + "name" : "Peter Meszaros" + }, + { + "drilldown" : "Robbie Hatley", + "y" : 1, + "name" : "Robbie Hatley" + }, + { + "name" : "Roger Bell_West", + "y" : 5, + "drilldown" : "Roger Bell_West" + }, + { + "y" : 3, + "drilldown" : "Simon Green", + "name" : "Simon Green" + }, + { + "drilldown" : "Thomas Kohler", + "y" : 4, + "name" : "Thomas Kohler" + }, + { + "drilldown" : "Ulrich Rieke", + "y" : 3, + "name" : "Ulrich Rieke" + }, + { + "y" : 3, + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan" + } + ] + } + ], + "yAxis" : { + "title" : { + "text" : "Total Solutions" } - }, - "subtitle" : { - "text" : "[Champions: 21] Last updated at 2024-02-25 15:07:11 GMT" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 7634a2592a..48e14f13a0 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,53 +1,44 @@ { - "subtitle" : { - "text" : "Last updated at 2024-02-25 15:07:10 GMT" - }, "tooltip" : { "pointFormat" : "<b>{point.y:.0f}</b>" }, - "legend" : { - "enabled" : "false" - }, "xAxis" : { - "type" : "category", "labels" : { "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" } - } - }, - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2024]" + }, + "type" : "category" }, "chart" : { "type" : "column" }, - "yAxis" : { - "title" : { - "text" : null - }, - "min" : 0 + "subtitle" : { + "text" : "Last updated at 2024-02-25 22:53:13 GMT" + }, + "legend" : { + "enabled" : "false" }, "series" : [ { + "name" : "Contributions", "dataLabels" : { "enabled" : "true", - "rotation" : -90, - "y" : 10, + "align" : "right", "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" }, - "align" : "right", - "format" : "{point.y:.0f}", - "color" : "#FFFFFF" + "y" : 10, + "rotation" : -90, + "color" : "#FFFFFF", + "format" : "{point.y:.0f}" }, - "name" : "Contributions", "data" : [ [ "Blog", - 4553 + 4555 ], [ "Perl", @@ -55,9 +46,18 @@ ], [ "Raku", - 7658 + 7664 ] ] } - ] + ], + "yAxis" : { + "min" : 0, + "title" : { + "text" : null + } + }, + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2024]" + } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 0c55990309..1e35d022b4 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,28 +1,29 @@ { - "tooltip" : { - "followPointer" : "true", - "headerFormat" : "<span style=\"font-size:11px\"></span>", - "pointFormat" : "<span style=\"color:{point.color}\">Challenge {point.name}</span>: <b>{point.y:f}</b><br/>" - }, "legend" : { "enabled" : "false" }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 - } + "chart" : { + "type" : "column" }, "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2024-02-25 15:07:11 GMT" + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2024-02-25 22:53:13 GMT" + }, + "tooltip" : { + "pointFormat" : "<span style=\"color:{point.color}\">Challenge {point.name}</span>: <b>{point.y:f}</b><br/>", + "headerFormat" : "<span style=\"font-size:11px\"></span>", + "followPointer" : "true" + }, + "xAxis" : { + "type" : "category" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } }, "drilldown" : { "series" : [ { - "id" : "001", "data" : [ [ "Perl", @@ -37,9 +38,12 @@ 12 ] ], - "name" : "001" + "name" : "001", + "id" : "001" }, { + "id" : "002", + "name" : "002", "data" : [ [ "Perl", @@ -53,12 +57,9 @@ "Blog", 10 ] - ], - "name" : "002", - "id" : "002" + ] }, { - "id" : "003", "data" : [ [ "Perl", @@ -73,10 +74,10 @@ 9 ] ], - "name" : "003" + "name" : "003", + "id" : "003" }, { - "id" : "004", "data" : [ [ "Perl", @@ -91,9 +92,12 @@ 10 ] ], - "name" : "004" + "name" : "004", + "id" : "004" }, { + "id" : "005", + "name" : "005", "data" : [ [ "Perl", @@ -107,9 +111,7 @@ "Blog", 12 ] - ], - "id" : "005", - "name" : "005" + ] }, { "data" : [ @@ -148,6 +150,7 @@ "name" : "007" }, { + "name" : "008", "data" : [ [ "Perl", @@ -162,10 +165,10 @@ 12 ] ], - "id" : "008", - "name" : "008" + "id" : "008" }, { + "id" : "009", "name" : "009", "data" : [ [ @@ -180,8 +183,7 @@ "Blog", 13 ] - ], - "id" : "009" + ] }, { "id" : "010", @@ -202,7 +204,7 @@ "name" : "010" }, { - "name" : "011", + "id" : "011", "data" : [ [ "Perl", @@ -217,7 +219,7 @@ 10 ] ], - "id" : "011" + "name" : "011" }, { "name" : "012", @@ -239,6 +241,7 @@ }, { "id" : "013", + "name" : "013", "data" : [ [ "Perl", @@ -252,11 +255,9 @@ "Blog", 13 ] - ], - "name" : "013" + ] }, { - "name" : "014", "data" : [ [ "Perl", @@ -271,6 +272,7 @@ 15 ] ], + "name" : "014", "id" : "014" }, { @@ -292,6 +294,7 @@ "id" : "015" }, { + "name" : "016", "data" : [ [ "Perl", @@ -306,11 +309,11 @@ 13 ] ], - "id" : "016", - "name" : "016" + "id" : "016" }, { "id" : "017", + "name" : "017", "data" : [ [ "Perl", @@ -324,10 +327,11 @@ "Blog", 12 ] - ], - "name" : "017" + ] }, { + "id" : "018", + "name" : "018", "data" : [ [ "Perl", @@ -341,12 +345,9 @@ "Blog", 14 ] - ], - "id" : "018", - "name" : "018" + ] }, { - "name" : "019", "data" : [ [ "Perl", @@ -361,10 +362,10 @@ 13 ] ], + "name" : "019", "id" : "019" }, { - "id" : "020", "data" : [ [ "Perl", @@ -379,10 +380,10 @@ 13 ] ], - "name" : "020" + "name" : "020", + "id" : "020" }, { - "id" : "021", "data" : [ [ "Perl", @@ -397,10 +398,11 @@ 10 ] ], - "name" : "021" + "name" : "021", + "id" : "021" }, { - "name" : "022", + "id" : "022", "data" : [ [ "Perl", @@ -415,7 +417,7 @@ 10 ] ], - "id" : "022" + "name" : "022" }, { "name" : "023", @@ -436,6 +438,7 @@ "id" : "023" }, { + "id" : "024", "data" : [ [ "Perl", @@ -450,11 +453,10 @@ 11 ] ], - "name" : "024", - "id" : "024" + "name" : "024" }, { - "name" : "025", + "id" : "025", "data" : [ [ "Perl", @@ -469,9 +471,10 @@ 12 ] ], - "id" : "025" + "name" : "025" }, { + "id" : "026", "data" : [ [ "Perl", @@ -486,7 +489,6 @@ 10 ] ], - "id" : "026", "name" : "026" }, { @@ -504,11 +506,10 @@ 9 ] ], - "id" : "027", - "name" : "027" + "name" : "027", |
