From eaaf2ee7172c6b56a0d2cf86fc0d8ea538c6be75 Mon Sep 17 00:00:00 2001 From: Mark <53903062+andemark@users.noreply.github.com> Date: Mon, 24 Apr 2023 07:11:55 +0000 Subject: Challenge 214 Solutions (Raku) --- challenge-214/mark-anderson/raku/ch-1.raku | 16 ++++++++++++++++ challenge-214/mark-anderson/raku/ch-2.raku | 27 +++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 challenge-214/mark-anderson/raku/ch-1.raku create mode 100644 challenge-214/mark-anderson/raku/ch-2.raku diff --git a/challenge-214/mark-anderson/raku/ch-1.raku b/challenge-214/mark-anderson/raku/ch-1.raku new file mode 100644 index 0000000000..aeb0059f6e --- /dev/null +++ b/challenge-214/mark-anderson/raku/ch-1.raku @@ -0,0 +1,16 @@ +#!/usr/bin/env raku +use Test; + +is-deeply rank-score(<1 2 4 3 5>), <5 4 S B G>>>.Str; +is-deeply rank-score(<8 5 6 7 4>), >>.Str; +is-deeply rank-score(<3 5 4 2>), >>.Str; +is-deeply rank-score(<2 5 2 1 7 5 1>), >>.Str; +is-deeply rank-score(<3 5>), ; + +sub rank-score($a) +{ + my $u := $a.unique.sort(-*); + my $s := ...*; + + $a.trans($u => $s.head($u)).comb(//) +} diff --git a/challenge-214/mark-anderson/raku/ch-2.raku b/challenge-214/mark-anderson/raku/ch-2.raku new file mode 100644 index 0000000000..fcc690a760 --- /dev/null +++ b/challenge-214/mark-anderson/raku/ch-2.raku @@ -0,0 +1,27 @@ +#!/usr/bin/env raku +use Adverb::Eject; +use Test; + +is collect-points(2,4,3,3,3,4,5,4,2), 23; +is collect-points(1,2,2,2,2,1), 20; +is collect-points(1), 1; +is collect-points(2,2,2,1,1,2,2,2), 40; +is collect-points(9,1,1,1,35,35,44,1,5,5,2,5,2,5,44,85,7,7,7,85,1,1,1), 91; + +sub collect-points(*@a) +{ + sum gather while @a + { + my $c = @a.pairs.classify({ .value }, :as{ .key }); + my $p = $c.first({ consecutive(.value) }); + my $a = $p ?? $p.value !! $c{ @a.Bag.minpairs.head.key }; + + @a[ $a ]:eject; + take $a.elems ** 2 + } +} + +sub consecutive(@a) +{ + .tail - .head == .end and [<] $_ given @a +} -- cgit From 63759f2845be6aea58bb7c069fb0e7a0beda8232 Mon Sep 17 00:00:00 2001 From: Bob Lied Date: Mon, 24 Apr 2023 07:42:56 -0500 Subject: Add blog reference for 213 --- challenge-213/bob-lied/blog.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 challenge-213/bob-lied/blog.txt diff --git a/challenge-213/bob-lied/blog.txt b/challenge-213/bob-lied/blog.txt new file mode 100644 index 0000000000..3288347232 --- /dev/null +++ b/challenge-213/bob-lied/blog.txt @@ -0,0 +1 @@ +https://dev.to/boblied/pwc-213-a-fun-sort-and-a-run-short-41d5 -- cgit From c9649ccd3cfb48e26c19886bb399bd1820715f8c Mon Sep 17 00:00:00 2001 From: Lubos Kolouch Date: Mon, 24 Apr 2023 16:02:44 +0200 Subject: Challenge 214 LK Perl Python --- challenge-214/lubos-kolouch/perl/ch-1.pl | 44 ++++++++++++++++++++++++++++ challenge-214/lubos-kolouch/perl/ch-2.pl | 46 ++++++++++++++++++++++++++++++ challenge-214/lubos-kolouch/python/ch-1.py | 31 ++++++++++++++++++++ challenge-214/lubos-kolouch/python/ch-2.py | 43 ++++++++++++++++++++++++++++ 4 files changed, 164 insertions(+) create mode 100644 challenge-214/lubos-kolouch/perl/ch-1.pl create mode 100644 challenge-214/lubos-kolouch/perl/ch-2.pl create mode 100644 challenge-214/lubos-kolouch/python/ch-1.py create mode 100644 challenge-214/lubos-kolouch/python/ch-2.py diff --git a/challenge-214/lubos-kolouch/perl/ch-1.pl b/challenge-214/lubos-kolouch/perl/ch-1.pl new file mode 100644 index 0000000000..c0b67d75eb --- /dev/null +++ b/challenge-214/lubos-kolouch/perl/ch-1.pl @@ -0,0 +1,44 @@ +#!/usr/bin/perl +use strict; +use warnings; +use Test::More; + +sub rank_scores { + my @scores = @_; + my @sorted_scores = sort { $b <=> $a } @scores; + my %ranks; + my $rank = 1; + for my $i (0 .. $#sorted_scores) { + if ($i > 0 && $sorted_scores[$i] == $sorted_scores[$i - 1]) { + $ranks{$sorted_scores[$i]} = $ranks{$sorted_scores[$i - 1]}; + } else { + $ranks{$sorted_scores[$i]} = $rank; + } + $rank++; + } + my @output; + for my $score (@scores) { + if ($ranks{$score} == 1) { + push @output, 'G'; + } elsif ($ranks{$score} == 2) { + push @output, 'S'; + } elsif ($ranks{$score} == 3) { + push @output, 'B'; + } else { + push @output, $ranks{$score}; + } + } + return \@output; +} + +my @test_cases = ( + { input => [1,2,4,3,5], output => ['5','4','S','B','G'] }, + { input => [8,5,6,7,4], output => ['G','4','B','S','5'] }, + { input => [3,5,4,2], output => ['B','G','S','4'] }, + { input => [2,5,2,1,7,5,1], output => ['4','S','4','6','G','S','6'] }, +); + +for my $test_case (@test_cases) { + is_deeply(rank_scores(@{ $test_case->{input} }), $test_case->{output}); +} + diff --git a/challenge-214/lubos-kolouch/perl/ch-2.pl b/challenge-214/lubos-kolouch/perl/ch-2.pl new file mode 100644 index 0000000000..5314086d5e --- /dev/null +++ b/challenge-214/lubos-kolouch/perl/ch-2.pl @@ -0,0 +1,46 @@ +use strict; +use warnings; + +sub max_score { + my @numbers = @_; + return helper(\@numbers, {}); +} + +sub helper { + my ($numbers, $memo) = @_; + + return 0 if scalar(@$numbers) == 0; + + my $key = join(',', @$numbers); + return $memo->{$key} if exists $memo->{$key}; + + my $max_score = 0; + my $i = 0; + while ($i < scalar(@$numbers)) { + my $j = $i; + while ($j < scalar(@$numbers) && $numbers->[$j] == $numbers->[$i]) { + $j++; + } + + my $length = $j - $i; + my @next_numbers = (@$numbers[0 .. $i - 1], @$numbers[$j .. scalar(@$numbers) - 1]); + my $score = $length * $length + helper(\@next_numbers, $memo); + $max_score = $max_score > $score ? $max_score : $score; + $i = $j; + } + + $memo->{$key} = $max_score; + return $max_score; +} + +# Test cases +my @numbers1 = (2, 4, 3, 3, 3, 4, 5, 4, 2); +my @numbers2 = (1, 2, 2, 2, 2, 1); +my @numbers3 = (1); +my @numbers4 = (2, 2, 2, 1, 1, 2, 2, 2); + +print max_score(@numbers1), "\n"; # Output: 23 +print max_score(@numbers2), "\n"; # Output: 20 +print max_score(@numbers3), "\n"; # Output: 1 +print max_score(@numbers4), "\n"; # Output: 40 + diff --git a/challenge-214/lubos-kolouch/python/ch-1.py b/challenge-214/lubos-kolouch/python/ch-1.py new file mode 100644 index 0000000000..710c81ea42 --- /dev/null +++ b/challenge-214/lubos-kolouch/python/ch-1.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +from typing import List + + +def rank_scores(scores: List[int]) -> List[str]: + sorted_scores = sorted(scores, reverse=True) + ranks = {} + rank = 1 + for i in range(len(sorted_scores)): + if i > 0 and sorted_scores[i] == sorted_scores[i - 1]: + ranks[sorted_scores[i]] = ranks[sorted_scores[i - 1]] + else: + ranks[sorted_scores[i]] = rank + rank += 1 + output = [] + for score in scores: + if ranks[score] == 1: + output.append('G') + elif ranks[score] == 2: + output.append('S') + elif ranks[score] == 3: + output.append('B') + else: + output.append(str(ranks[score])) + return output + + +scores = [1, 2, 4, 3, 5] +result = rank_scores(scores) +print(result) diff --git a/challenge-214/lubos-kolouch/python/ch-2.py b/challenge-214/lubos-kolouch/python/ch-2.py new file mode 100644 index 0000000000..72d7207b50 --- /dev/null +++ b/challenge-214/lubos-kolouch/python/ch-2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + + +def max_score(numbers): + + def helper(numbers, memo): + if not numbers: + return 0 + + key = tuple(numbers) + if key in memo: + return memo[key] + + max_score = 0 + i = 0 + while i < len(numbers): + j = i + while j < len(numbers) and numbers[j] == numbers[i]: + j += 1 + + length = j - i + next_numbers = numbers[:i] + numbers[j:] + score = length * length + helper(next_numbers, memo) + max_score = max(max_score, score) + i = j + + memo[key] = max_score + return max_score + + return helper(numbers, {}) + + +# Test cases +numbers1 = [2, 4, 3, 3, 3, 4, 5, 4, 2] +numbers2 = [1, 2, 2, 2, 2, 1] +numbers3 = [1] +numbers4 = [2, 2, 2, 1, 1, 2, 2, 2] + +print(max_score(numbers1)) # Output: 23 +print(max_score(numbers2)) # Output: 20 +print(max_score(numbers3)) # Output: 1 +print(max_score(numbers4)) # Output: 40 -- cgit From f90349fbd02a4b243f73bcdfc245abfa36df497f Mon Sep 17 00:00:00 2001 From: Lubos Kolouch Date: Mon, 24 Apr 2023 19:00:10 +0200 Subject: Challenge 070 LK --- challenge-070/lubos-kolouch/bash/ch-2.sh | 20 ++++++++++++++++ challenge-070/lubos-kolouch/cpp/ch-2.cpp | 23 ++++++++++++++++++ challenge-070/lubos-kolouch/go/ch-2.go | 32 ++++++++++++++++++++++++++ challenge-070/lubos-kolouch/java/ch-2.java | 25 ++++++++++++++++++++ challenge-070/lubos-kolouch/javascript/ch-2.js | 12 ++++++++++ challenge-070/lubos-kolouch/perl/ch-1.pl | 16 +++++++++++++ challenge-070/lubos-kolouch/perl/ch-2.pl | 16 +++++++++++++ challenge-070/lubos-kolouch/php/ch-2.php | 16 +++++++++++++ challenge-070/lubos-kolouch/python/ch-1.py | 16 +++++++++++++ challenge-070/lubos-kolouch/python/ch-2.py | 14 +++++++++++ challenge-070/lubos-kolouch/raku/ch-2.raku | 12 ++++++++++ challenge-070/lubos-kolouch/ruby/ch-2.rb | 12 ++++++++++ challenge-070/lubos-kolouch/vba/ch-2.vb | 26 +++++++++++++++++++++ 13 files changed, 240 insertions(+) create mode 100644 challenge-070/lubos-kolouch/bash/ch-2.sh create mode 100644 challenge-070/lubos-kolouch/cpp/ch-2.cpp create mode 100644 challenge-070/lubos-kolouch/go/ch-2.go create mode 100644 challenge-070/lubos-kolouch/java/ch-2.java create mode 100644 challenge-070/lubos-kolouch/javascript/ch-2.js create mode 100644 challenge-070/lubos-kolouch/perl/ch-1.pl create mode 100644 challenge-070/lubos-kolouch/perl/ch-2.pl create mode 100644 challenge-070/lubos-kolouch/php/ch-2.php create mode 100644 challenge-070/lubos-kolouch/python/ch-1.py create mode 100644 challenge-070/lubos-kolouch/python/ch-2.py create mode 100644 challenge-070/lubos-kolouch/raku/ch-2.raku create mode 100644 challenge-070/lubos-kolouch/ruby/ch-2.rb create mode 100644 challenge-070/lubos-kolouch/vba/ch-2.vb diff --git a/challenge-070/lubos-kolouch/bash/ch-2.sh b/challenge-070/lubos-kolouch/bash/ch-2.sh new file mode 100644 index 0000000000..de8c2e9c84 --- /dev/null +++ b/challenge-070/lubos-kolouch/bash/ch-2.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +N=4 +gray_code=("0" "1") + +for ((i=2; i<=N; i++)); do + rev_gray_code=("${gray_code[@]}") + for ((j=${#rev_gray_code[@]}-1; j>=0; j--)); do + rev_gray_code[j]="1${rev_gray_code[j]}" + done + for ((j=0; j<${#gray_code[@]}; j++)); do + gray_code[j]="0${gray_code[j]}" + done + gray_code+=("${rev_gray_code[@]}") +done + +for x in "${gray_code[@]}"; do + echo -n "$((2#$x)) " +done +echo diff --git a/challenge-070/lubos-kolouch/cpp/ch-2.cpp b/challenge-070/lubos-kolouch/cpp/ch-2.cpp new file mode 100644 index 0000000000..2e2bd18cdd --- /dev/null +++ b/challenge-070/lubos-kolouch/cpp/ch-2.cpp @@ -0,0 +1,23 @@ +#include +#include +#include +#include + +int main() { + int N = 4; + std::vector grayCode = {"0", "1"}; + + for (int i = 2; i <= N; i++) { + std::vector revGrayCode(grayCode.rbegin(), grayCode.rend()); + for (auto &x : grayCode) x = '0' + x; + for (auto &x : revGrayCode) x = '1' + x; + grayCode.insert(grayCode.end(), revGrayCode.begin(), revGrayCode.end()); + } + + for (const auto &x : grayCode) { + std::cout << std::stoi(x, nullptr, 2) << ' '; + } + std::cout << '\n'; + + return 0; +} diff --git a/challenge-070/lubos-kolouch/go/ch-2.go b/challenge-070/lubos-kolouch/go/ch-2.go new file mode 100644 index 0000000000..95739f95ab --- /dev/null +++ b/challenge-070/lubos-kolouch/go/ch-2.go @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "strconv" +) + +func main() { + N := 4 + grayCode := []string{"0", "1"} + + for i := 2; i <= N; i++ { + revGrayCode := make([]string, len(grayCode)) + copy(revGrayCode, grayCode) + for j := 0; j < len(revGrayCode)/2; j++ { + revGrayCode[j], revGrayCode[len(revGrayCode)-j-1] = revGrayCode[len(revGrayCode)-j-1], revGrayCode[j] + } + for j := 0; j < len(grayCode); j++ { + grayCode[j] = "0" + grayCode[j] + } + for j := 0; j < len(revGrayCode); j++ { + revGrayCode[j] = "1" + revGrayCode[j] + } + grayCode = append(grayCode, revGrayCode...) + } + + for _, x := range grayCode { + n, _ := strconv.ParseInt(x, 2, 64) + fmt.Print(n, " ") + } + fmt.Println() +} diff --git a/challenge-070/lubos-kolouch/java/ch-2.java b/challenge-070/lubos-kolouch/java/ch-2.java new file mode 100644 index 0000000000..be3c4a7ca3 --- /dev/null +++ b/challenge-070/lubos-kolouch/java/ch-2.java @@ -0,0 +1,25 @@ +public class Main { + public static void main(String[] args) { + int N = 4; + ArrayList grayCode = new ArrayList<>(); + grayCode.add("0"); + grayCode.add("1"); + + for (int i = 2; i <= N; i++) { + ArrayList revGrayCode = new ArrayList<>(grayCode); + Collections.reverse(revGrayCode); + for (int j = 0; j < grayCode.size(); j++) { + grayCode.set(j, "0" + grayCode.get(j)); + } + for (int j = 0; j < revGrayCode.size(); j++) { + revGrayCode.set(j, "1" + revGrayCode.get(j)); + } + grayCode.addAll(revGrayCode); + } + + for (String x : grayCode) { + System.out.print(Integer.parseInt(x, 2) + " "); + } + System.out.println(); + } +} diff --git a/challenge-070/lubos-kolouch/javascript/ch-2.js b/challenge-070/lubos-kolouch/javascript/ch-2.js new file mode 100644 index 0000000000..44602ebfca --- /dev/null +++ b/challenge-070/lubos-kolouch/javascript/ch-2.js @@ -0,0 +1,12 @@ +const N = 4; +let grayCode = ['0', '1']; + +for (let i = 2; i <= N; i++) { + let revGrayCode = grayCode.slice().reverse(); + grayCode = grayCode.map(x => '0' + x); + revGrayCode = revGrayCode.map(x => '1' + x); + grayCode = grayCode.concat(revGrayCode); +} + +grayCode = grayCode.map(x => parseInt(x, 2)); +console.log(grayCode); diff --git a/challenge-070/lubos-kolouch/perl/ch-1.pl b/challenge-070/lubos-kolouch/perl/ch-1.pl new file mode 100644 index 0000000000..bc18e6f7fa --- /dev/null +++ b/challenge-070/lubos-kolouch/perl/ch-1.pl @@ -0,0 +1,16 @@ +#!/usr/bin/perl +use strict; +use warnings; + +my $S = 'perlandraku'; +my $C = 3; +my $O = 4; +my $N = length($S); + +for my $i ( 1 .. $C ) { + my $x = $i % $N; + my $y = ( $i + $O ) % $N; + substr( $S, $x, 1, substr( $S, $y, 1, substr( $S, $x, 1 ) ) ); +} + +print "$S\n"; diff --git a/challenge-070/lubos-kolouch/perl/ch-2.pl b/challenge-070/lubos-kolouch/perl/ch-2.pl new file mode 100644 index 0000000000..a368fca1ba --- /dev/null +++ b/challenge-070/lubos-kolouch/perl/ch-2.pl @@ -0,0 +1,16 @@ +#!/usr/bin/perl +use strict; +use warnings; + +my $N = 4; +my @gray_code = ( 0, 1 ); + +for my $i ( 2 .. $N ) { + my @rev_gray_code = reverse @gray_code; + @gray_code = map { "0$_" } @gray_code; + @rev_gray_code = map { "1$_" } @rev_gray_code; + push @gray_code, @rev_gray_code; +} + +@gray_code = map { oct("0b$_") } @gray_code; +print join( ", ", @gray_code ), "\n"; diff --git a/challenge-070/lubos-kolouch/php/ch-2.php b/challenge-070/lubos-kolouch/php/ch-2.php new file mode 100644 index 0000000000..b85f40040b --- /dev/null +++ b/challenge-070/lubos-kolouch/php/ch-2.php @@ -0,0 +1,16 @@ + diff --git a/challenge-070/lubos-kolouch/python/ch-1.py b/challenge-070/lubos-kolouch/python/ch-1.py new file mode 100644 index 0000000000..21cbaaff44 --- /dev/null +++ b/challenge-070/lubos-kolouch/python/ch-1.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +S = "perlandraku" +C = 3 +O = 4 +N = len(S) +S = list(S) + +for i in range(1, C + 1): + x = i % N + y = (i + O) % N + S[x], S[y] = S[y], S[x] + +S = "".join(S) +print(S) diff --git a/challenge-070/lubos-kolouch/python/ch-2.py b/challenge-070/lubos-kolouch/python/ch-2.py new file mode 100644 index 0000000000..48ab086970 --- /dev/null +++ b/challenge-070/lubos-kolouch/python/ch-2.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +N = 4 +gray_code = ["0", "1"] + +for i in range(2, N + 1): + rev_gray_code = gray_code[::-1] + gray_code = ["0" + x for x in gray_code] + rev_gray_code = ["1" + x for x in rev_gray_code] + gray_code += rev_gray_code + +gray_code = [int(x, 2) for x in gray_code] +print(gray_code) diff --git a/challenge-070/lubos-kolouch/raku/ch-2.raku b/challenge-070/lubos-kolouch/raku/ch-2.raku new file mode 100644 index 0000000000..2f56076cd0 --- /dev/null +++ b/challenge-070/lubos-kolouch/raku/ch-2.raku @@ -0,0 +1,12 @@ +my $N = 4; +my @gray-code = <0 1>; + +for 2..$N -> $i { + my @rev-gray-code = @gray-code.reverse; + @gray-code = @gray-code.map: { "0$_" }; + @rev-gray-code = @rev-gray-code.map: { "1$_" }; + @gray-code.append: @rev-gray-code; +} + +@gray-code .= map: { :2($_) }; +say @gray-code.join(', '); diff --git a/challenge-070/lubos-kolouch/ruby/ch-2.rb b/challenge-070/lubos-kolouch/ruby/ch-2.rb new file mode 100644 index 0000000000..5144b5f350 --- /dev/null +++ b/challenge-070/lubos-kolouch/ruby/ch-2.rb @@ -0,0 +1,12 @@ +N = 4 +gray_code = ['0', '1'] + +(2..N).each do |i| + rev_gray_code = gray_code.reverse + gray_code = gray_code.map { |x| '0' + x } + rev_gray_code = rev_gray_code.map { |x| '1' + x } + gray_code += rev_gray_code +end + +gray_code = gray_code.map { |x| x.to_i(2) } +puts gray_code.join(', ') diff --git a/challenge-070/lubos-kolouch/vba/ch-2.vb b/challenge-070/lubos-kolouch/vba/ch-2.vb new file mode 100644 index 0000000000..5a34c51940 --- /dev/null +++ b/challenge-070/lubos-kolouch/vba/ch-2.vb @@ -0,0 +1,26 @@ +Sub GrayCode() + Dim N As Integer + N = 4 + Dim grayCode As New Collection + grayCode.Add "0" + grayCode.Add "1" + + Dim i As Integer + For i = 2 To N + Dim revGrayCode As New Collection + Dim j As Integer + For j = grayCode.Count To 1 Step -1 + revGrayCode.Add "1" & grayCode(j) + Next j + For j = 1 To grayCode.Count + grayCode(j) = "0" & grayCode(j) + Next j + For j = 1 To revGrayCode.Count + grayCode.Add revGrayCode(j) + Next j + Next i + + For i = 1 To grayCode.Count + Debug.Print CStr(CLng("&B" & grayCode(i))) & " "; + Next i +End Sub -- cgit From b0b0afd59d09807515f79edd6ce3d3cb24d1140c Mon Sep 17 00:00:00 2001 From: David Ferrone Date: Mon, 24 Apr 2023 14:28:32 -0400 Subject: Week 214 --- challenge-214/zapwai/perl/ch-1.pl | 64 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 challenge-214/zapwai/perl/ch-1.pl diff --git a/challenge-214/zapwai/perl/ch-1.pl b/challenge-214/zapwai/perl/ch-1.pl new file mode 100644 index 0000000000..974552f6e0 --- /dev/null +++ b/challenge-214/zapwai/perl/ch-1.pl @@ -0,0 +1,64 @@ +use v5.30.0; +my @scores = (1,2,4,3,5); + +my @copy = @scores; +my %vals; + +$vals{$_} = 1 foreach (@scores); + +my @ordered_vals = keys %vals; +@ordered_vals = reverse sort @ordered_vals; +my @ranks; +for my $k (0 .. $#scores) { + foreach my $j (0 .. $#ordered_vals) { + $ranks[$k] = $j + 1 if ($scores[$k] == $ordered_vals[$j]); + } +} + +my ($one, $two, $tre); +foreach (0 .. $#ranks) { + if ($ranks[$_] == 1) { + $one++; + } elsif ($ranks[$_] == 2) { + $two++; + } elsif ($ranks[$_] == 3) { + $tre++; + } +} + +if ($one > 3) { + # Assign only gold + foreach (0 .. $#ranks) { + if ($ranks[$_] == 1) { + $ranks[$_] = "G"; + } + } +} elsif ( $one + $two >= 3 ) { + # assign gold and silver + foreach (0 .. $#ranks) { + if ($ranks[$_] == 1) { + $ranks[$_] = "G"; + } elsif ($ranks[$_] == 2) { + $ranks[$_] = "S"; + } + } +} else { + foreach (0 .. $#ranks) { + if ($ranks[$_] == 1) { + $ranks[$_] = "G"; + } elsif ($ranks[$_] == 2) { + $ranks[$_] = "S"; + } elsif ($ranks[$_] == 3) { + $ranks[$_] = "B"; + } + } + +} + +print "\@scores: "; +print foreach (@scores); +say ""; + +print "\@ranks : "; +print foreach (@ranks); +say ""; -- cgit From 9d16fe75b0ec973971729f62695e3600a7e9502c Mon Sep 17 00:00:00 2001 From: Mark <53903062+andemark@users.noreply.github.com> Date: Mon, 24 Apr 2023 22:37:55 +0000 Subject: ch-2.raku was incorrect --- challenge-214/mark-anderson/raku/ch-2.raku | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 challenge-214/mark-anderson/raku/ch-2.raku diff --git a/challenge-214/mark-anderson/raku/ch-2.raku b/challenge-214/mark-anderson/raku/ch-2.raku deleted file mode 100644 index fcc690a760..0000000000 --- a/challenge-214/mark-anderson/raku/ch-2.raku +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env raku -use Adverb::Eject; -use Test; - -is collect-points(2,4,3,3,3,4,5,4,2), 23; -is collect-points(1,2,2,2,2,1), 20; -is collect-points(1), 1; -is collect-points(2,2,2,1,1,2,2,2), 40; -is collect-points(9,1,1,1,35,35,44,1,5,5,2,5,2,5,44,85,7,7,7,85,1,1,1), 91; - -sub collect-points(*@a) -{ - sum gather while @a - { - my $c = @a.pairs.classify({ .value }, :as{ .key }); - my $p = $c.first({ consecutive(.value) }); - my $a = $p ?? $p.value !! $c{ @a.Bag.minpairs.head.key }; - - @a[ $a ]:eject; - take $a.elems ** 2 - } -} - -sub consecutive(@a) -{ - .tail - .head == .end and [<] $_ given @a -} -- cgit From 0a056bf9f4653d39f17c4d308ae18e89d4f3a255 Mon Sep 17 00:00:00 2001 From: Luis Mochan Date: Mon, 24 Apr 2023 22:26:27 -0600 Subject: Solve PWC214 --- challenge-214/wlmb/blog.txt | 2 ++ challenge-214/wlmb/perl/ch-1.pl | 17 +++++++++++++++++ challenge-214/wlmb/perl/ch-2.pl | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 challenge-214/wlmb/blog.txt create mode 100755 challenge-214/wlmb/perl/ch-1.pl create mode 100755 challenge-214/wlmb/perl/ch-2.pl diff --git a/challenge-214/wlmb/blog.txt b/challenge-214/wlmb/blog.txt new file mode 100644 index 0000000000..1bdbc7f091 --- /dev/null +++ b/challenge-214/wlmb/blog.txt @@ -0,0 +1,2 @@ +https://wlmb.github.io/2023/04/24/PWC214/ + diff --git a/challenge-214/wlmb/perl/ch-1.pl b/challenge-214/wlmb/perl/ch-1.pl new file mode 100755 index 0000000000..036f69a21c --- /dev/null +++ b/challenge-214/wlmb/perl/ch-1.pl @@ -0,0 +1,17 @@ +#!/usr/bin/env perl +# Perl weekly challenge 214 +# Task 1: Rank Score +# +# See https://wlmb.github.io/2023/04/24/PWC214/#task-1-rank-score +use v5.36; +die <<~"FIN" unless @ARGV; + Usage: $0 S1 [S2..] + to rank the scores S1 S2... + FIN +my @scores=@ARGV; +my @ranks=(qw(Gold Silver Bronce), 4..@scores); # G S B 4 5 6... +my $counter; +my %score_to_rank; +map {my $current=$ranks[$counter++]; $score_to_rank{$_}//=$current} + sort {$b<=>$a} @scores; +say join " ", @scores, "->", @score_to_rank{@scores} diff --git a/challenge-214/wlmb/perl/ch-2.pl b/challenge-214/wlmb/perl/ch-2.pl new file mode 100755 index 0000000000..e94355f79b --- /dev/null +++ b/challenge-214/wlmb/perl/ch-2.pl @@ -0,0 +1,38 @@ +#!/usr/bin/env perl +# Perl weekly challenge 214 +# Task 2: Collect Points +# +# See https://wlmb.github.io/2023/04/24/PWC214/#task-2-collect-points +use v5.36; +die <<~"FIN" unless @ARGV; + Usage: $0 N1 [N2...] + to collect all points from the list N1 N2... + FIN +# Build list of nodes, one for each group +my @list=@ARGV; +my $first=shift @list; +my @current=($first, 1); # nodes are of the form [value, count] +my @nodes; +for(@list){ + push(@nodes, [@current]), @current=($_, 0) unless $current[0] eq $_; # New node if value changes + $current[1]++; +} +push @nodes, [@current]; # array of pairs [value, count] +# remove all groups with different starting group and choose largest score +my @points = sort {$b <=> $a} map {remove($_, \@nodes)} 0..@nodes-1; +my $points=$points[0]; # largest score +say "@ARGV -> $points"; + +# Get max points after removing all $remaining nodes starting from $which +sub remove($which, $remaining){ + my @copy=@$remaining; + my $points = $copy[$which][1]**2; + # join neighbor groups if possible + $copy[$which-1]=[$copy[$which-1][0],$copy[$which-1][1]+$copy[$which+1][1]], + splice @copy, $which+1,1 + if 0<$which<@copy-1 && $copy[$which-1][0] eq $copy[$which+1][0]; + splice @copy, $which, 1; + my @points= sort {$b <=> $a} map {remove($_, \@copy)} 0..@copy-1; + $points += $points[0] if @points; + return $points; +} -- cgit From a0d9ecf91bcc757cea259d0c869c50d8794d8edd Mon Sep 17 00:00:00 2001 From: Mark <53903062+andemark@users.noreply.github.com> Date: Tue, 25 Apr 2023 10:36:40 +0000 Subject: ch-1.raku was incorrect too :-( --- challenge-214/mark-anderson/raku/ch-1.raku | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 challenge-214/mark-anderson/raku/ch-1.raku diff --git a/challenge-214/mark-anderson/raku/ch-1.raku b/challenge-214/mark-anderson/raku/ch-1.raku deleted file mode 100644 index aeb0059f6e..0000000000 --- a/challenge-214/mark-anderson/raku/ch-1.raku +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env raku -use Test; - -is-deeply rank-score(<1 2 4 3 5>), <5 4 S B G>>>.Str; -is-deeply rank-score(<8 5 6 7 4>), >>.Str; -is-deeply rank-score(<3 5 4 2>), >>.Str; -is-deeply rank-score(<2 5 2 1 7 5 1>), >>.Str; -is-deeply rank-score(<3 5>), ; - -sub rank-score($a) -{ - my $u := $a.unique.sort(-*); - my $s := ...*; - - $a.trans($u => $s.head($u)).comb(//) -} -- cgit From c2faea053751fb6a48e1ddaab1476ccac3336376 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Tue, 25 Apr 2023 12:01:15 +0100 Subject: - Added solutions by Mark Anderson. - Added solutions by Lubos Kolouch. - Added solutions by David Ferrone. --- challenge-214/eric-cheung/python/ch-1.py | 12 + challenge-214/eric-cheung/python/ch-2.py | 11 + stats/pwc-challenge-070.json | 271 +++--- stats/pwc-challenge-213.json | 702 ++++++++++++++++ stats/pwc-current.json | 655 +-------------- stats/pwc-language-breakdown-summary.json | 46 +- stats/pwc-language-breakdown.json | 1297 +++++++++++++++-------------- stats/pwc-leaders.json | 340 ++++---- stats/pwc-summary-1-30.json | 98 +-- stats/pwc-summary-121-150.json | 44 +- stats/pwc-summary-151-180.json | 38 +- stats/pwc-summary-181-210.json | 48 +- stats/pwc-summary-211-240.json | 98 +-- stats/pwc-summary-241-270.json | 120 +-- stats/pwc-summary-271-300.json | 88 +- stats/pwc-summary-31-60.json | 114 +-- stats/pwc-summary-61-90.json | 36 +- stats/pwc-summary-91-120.json | 50 +- stats/pwc-summary.json | 52 +- 19 files changed, 2143 insertions(+), 1977 deletions(-) create mode 100755 challenge-214/eric-cheung/python/ch-1.py create mode 100755 challenge-214/eric-cheung/python/ch-2.py create mode 100644 stats/pwc-challenge-213.json diff --git a/challenge-214/eric-cheung/python/ch-1.py b/challenge-214/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..ea68026c42 --- /dev/null +++ b/challenge-214/eric-cheung/python/ch-1.py @@ -0,0 +1,12 @@ + +arrInputScore = [1, 2, 4, 3, 5] ## Example 1 +## arrInputScore = [8, 5, 6, 7, 4] ## Example 2 +## arrInputScore = [3, 5, 4, 2] ## Example 3 +## arrInputScore = [2, 5, 2, 1, 7, 5, 1] ## Example 4 + +arrUniqSortScore = list(set(arrInputScore)) +arrUniqSortScore = arrUniqSortScore[::-1] +arrInterRank = [max(arrUniqSortScore.index(nElem), len([1 for nLoop in arrInputScore if nLoop > nElem])) for nElem in arrInputScore] +arrOutputRank = ["G" if nElem == 0 else "S" if nElem == 1 else "B" if nElem == 2 else nElem + 1 for nElem in arrInterRank] + +print (arrOutputRank) diff --git a/challenge-214/eric-cheung/python/ch-2.py b/challenge-214/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..323352eaf9 --- /dev/null +++ b/challenge-214/eric-cheung/python/ch-2.py @@ -0,0 +1,11 @@ + +## arrNum = [2, 4, 3, 3, 3, 4, 5, 4, 2] ## Example 1 +## arrNum = [1, 2, 2, 2, 2, 1] ## Example 2 +## arrNum = [1] ## Example 3 +arrNum = [2, 2, 2, 1, 1, 2, 2, 2] ## Example 4 + +arrUniq = list(set(arrNum)) +arrCount = [arrNum.count(nElem) for nElem in arrUniq] +arrSQ = [nElem * nElem for nElem in arrCount] + +print (sum(arrSQ)) diff --git a/stats/pwc-challenge-070.json b/stats/pwc-challenge-070.json index 79c5d3c600..058eb316ae 100644 --- a/stats/pwc-challenge-070.json +++ b/stats/pwc-challenge-070.json @@ -1,26 +1,33 @@ { - "subtitle" : { - "text" : "[Champions: 31] Last updated at 2022-04-20 12:40:31 GMT" - }, - "xAxis" : { - "type" : "category" + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } }, - "title" : { - "text" : "The Weekly Challenge - 070" + "chart" : { + "type" : "column" }, "plotOptions" : { "series" : { - "borderWidth" : 0, "dataLabels" : { "format" : "{point.y}", "enabled" : 1 - } + }, + "borderWidth" : 0 } }, + "subtitle" : { + "text" : "[Champions: 32] Last updated at 2023-04-25 10:52:08 GMT" + }, + "title" : { + "text" : "The Weekly Challenge - 070" + }, + "xAxis" : { + "type" : "category" + }, "drilldown" : { "series" : [ { - "id" : "Andrew Shitov", "data" : [ [ "Raku", @@ -31,9 +38,11 @@ 3 ] ], - "name" : "Andrew Shitov" + "name" : "Andrew Shitov", + "id" : "Andrew Shitov" }, { + "id" : "Arne Sommer", "data" : [ [ "Perl", @@ -48,11 +57,9 @@ 1 ] ], - "id" : "Arne Sommer", "name" : "Arne Sommer" }, { - "name" : "Athanasius", "id" : "Athanasius", "data" : [ [ @@ -63,16 +70,17 @@ "Raku", 2 ] - ] + ], + "name" : "Athanasius" }, { - "name" : "Bob Lied", "data" : [ [ "Perl", 2 ] ], + "name" : "Bob Lied", "id" : "Bob Lied" }, { @@ -86,7 +94,6 @@ "name" : "Cheok-Yin Fung" }, { - "name" : "Colin Crain", "id" : "Colin Crain", "data" : [ [ @@ -101,46 +108,47 @@ "Blog", 1 ] - ] + ], + "name" : "Colin Crain" }, { - "name" : "Csaba Simandi", - "id" : "Csaba Simandi", "data" : [ [ "Perl", 1 ] - ] + ], + "name" : "Csaba Simandi", + "id" : "Csaba Simandi" }, { - "name" : "Dave Jacoby", + "id" : "Dave Jacoby", "data" : [ [ "Perl", 2 ] ], - "id" : "Dave Jacoby" + "name" : "Dave Jacoby" }, { - "name" : "Duncan C. White", "id" : "Duncan C. White", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Duncan C. White" }, { - "name" : "E. Choroba", "data" : [ [ "Perl", 2 ] ], + "name" : "E. Choroba", "id" : "E. Choroba" }, { @@ -162,6 +170,7 @@ "name" : "Jaldhar H. Vyas" }, { + "id" : "Javier Luque", "name" : "Javier Luque", "data" : [ [ @@ -176,21 +185,19 @@ "Blog", 1 ] - ], - "id" : "Javier Luque" + ] }, { - "name" : "Jorg Sommrey", + "id" : "Jorg Sommrey", "data" : [ [ "Perl", 2 ] ], - "id" : "Jorg Sommrey" + "name" : "Jorg Sommrey" }, { - "name" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -205,10 +212,26 @@ 1 ] ], + "name" : "Laurent Rosenfeld", "id" : "Laurent Rosenfeld" }, + { + "name" : "Lubos Kolouch", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 1 + ] + ], + "id" : "Lubos Kolouch" + }, { "id" : "Luca Ferrari", + "name" : "Luca Ferrari", "data" : [ [ "Raku", @@ -218,21 +241,19 @@ "Blog", 2 ] - ], - "name" : "Luca Ferrari" + ] }, { - "name" : "Mark Anderson", - "id" : "Mark Anderson", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "Mark Anderson", + "id" : "Mark Anderson" }, { - "name" : "Mohammad S Anwar", "id" : "Mohammad S Anwar", "data" : [ [ @@ -247,9 +268,11 @@ "Blog", 3 ] - ] + ], + "name" : "Mohammad S Anwar" }, { + "id" : "Myoungjin Jeon", "data" : [ [ "Perl", @@ -260,18 +283,17 @@ 2 ] ], - "id" : "Myoungjin Jeon", "name" : "Myoungjin Jeon" }, { + "id" : "Niels van Dijke", + "name" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ], - "id" : "Niels van Dijke", - "name" : "Niels van Dijke" + ] }, { "name" : "Noud Aldenhoven", @@ -284,37 +306,36 @@ "id" : "Noud Aldenhoven" }, { - "name" : "Paulo Custodio", - "id" : "Paulo Custodio", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Paulo Custodio", + "id" : "Paulo Custodio" }, { - "id" : "Pete Houston", + "name" : "Pete Houston", "data" : [ [ "Perl", 2 ] ], - "name" : "Pete Houston" + "id" : "Pete Houston" }, { "name" : "Richard Park", - "id" : "Richard Park", "data" : [ [ "Blog", 1 ] - ] + ], + "id" : "Richard Park" }, { - "name" : "Roger Bell_West", "id" : "Roger Bell_West", "data" : [ [ @@ -329,10 +350,12 @@ "Blog", 1 ] - ] + ], + "name" : "Roger Bell_West" }, { "id" : "Shahed Nooshmand", + "name" : "Shahed Nooshmand", "data" : [ [ "Raku", @@ -342,11 +365,9 @@ "Blog", 1 ] - ], - "name" : "Shahed Nooshmand" + ] }, { - "name" : "Simon Green", "data" : [ [ "Perl", @@ -357,16 +378,17 @@ 1 ] ], + "name" : "Simon Green", "id" : "Simon Green" }, { + "id" : "Simon Proctor", "data" : [ [ "Raku", 2 ] ], - "id" : "Simon Proctor", "name" : "Simon Proctor" }, { @@ -376,8 +398,8 @@ 2 ] ], - "id" : "Stuart Little", - "name" : "Stuart Little" + "name" : "Stuart Little", + "id" : "Stuart Little" }, { "id" : "Ulrich Rieke", @@ -395,17 +417,17 @@ }, { "name" : "Walt Mankowski", - "id" : "Walt Mankowski", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Walt Mankowski" }, { - "name" : "Wanderdoc", "id" : "Wanderdoc", + "name" : "Wanderdoc", "data" : [ [ "Perl", @@ -415,39 +437,47 @@ } ] }, + "tooltip" : { + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1, + "headerFormat" : "{series.name}
" + }, + "legend" : { + "enabled" : 0 + }, "series" : [ { - "name" : "The Weekly Challenge - 070", + "colorByPoint" : 1, "data" : [ { - "y" : 5, + "name" : "Andrew Shitov", "drilldown" : "Andrew Shitov", - "name" : "Andrew Shitov" + "y" : 5 }, { + "drilldown" : "Arne Sommer", "name" : "Arne Sommer", - "y" : 5, - "drilldown" : "Arne Sommer" + "y" : 5 }, { - "drilldown" : "Athanasius", "y" : 4, + "drilldown" : "Athanasius", "name" : "Athanasius" }, { + "drilldown" : "Bob Lied", "name" : "Bob Lied", - "y" : 2, - "drilldown" : "Bob Lied" + "y" : 2 }, { - "name" : "Cheok-Yin Fung", "drilldown" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung", "y" : 2 }, { - "name" : "Colin Crain", + "y" : 5, "drilldown" : "Colin Crain", - "y" : 5 + "name" : "Colin Crain" }, { "y" : 1, @@ -455,84 +485,89 @@ "name" : "Csaba Simandi" }, { - "name" : "Dave Jacoby", "drilldown" : "Dave Jacoby", + "name" : "Dave Jacoby", "y" : 2 }, { + "drilldown" : "Duncan C. White", "name" : "Duncan C. White", - "y" : 2, - "drilldown" : "Duncan C. White" + "y" : 2 }, { + "y" : 2, "name" : "E. Choroba", - "drilldown" : "E. Choroba", - "y" : 2 + "drilldown" : "E. Choroba" }, { + "drilldown" : "Jaldhar H. Vyas", "name" : "Jaldhar H. Vyas", - "y" : 5, - "drilldown" : "Jaldhar H. Vyas" + "y" : 5 }, { + "name" : "Javier Luque", "drilldown" : "Javier Luque", - "y" : 5, - "name" : "Javier Luque" + "y" : 5 }, { "drilldown" : "Jorg Sommrey", - "y" : 2, - "name" : "Jorg Sommrey" + "name" : "Jorg Sommrey", + "y" : 2 }, { - "name" : "Laurent Rosenfeld", + "y" : 4, "drilldown" : "Laurent Rosenfeld", - "y" : 4 + "name" : "Laurent Rosenfeld" }, { - "y" : 4, + "y" : 3, + "name" : "Lubos Kolouch", + "drilldown" : "Lubos Kolouch" + }, + { + "name" : "Luca Ferrari", "drilldown" : "Luca Ferrari", - "name" : "Luca Ferrari" + "y" : 4 }, { + "y" : 2, "name" : "Mark Anderson", - "drilldown" : "Mark Anderson", - "y" : 2 + "drilldown" : "Mark Anderson" }, { + "name" : "Mohammad S Anwar", "drilldown" : "Mohammad S Anwar", - "y" : 7, - "name" : "Mohammad S Anwar" + "y" : 7 }, { - "name" : "Myoungjin Jeon", "y" : 4, + "name" : "Myoungjin Jeon", "drilldown" : "Myoungjin Jeon" }, { "name" : "Niels van Dijke", - "y" : 2, - "drilldown" : "Niels van Dijke" + "drilldown" : "Niels van Dijke", + "y" : 2 }, { + "name" : "Noud Aldenhoven", "drilldown" : "Noud Aldenhoven", - "y" : 2, - "name" : "Noud Aldenhoven" + "y" : 2 }, { + "name" : "Paulo Custodio", "drilldown" : "Paulo Custodio", - "y" : 2, - "name" : "Paulo Custodio" + "y" : 2 }, { "name" : "Pete Houston", - "y" : 2, - "drilldown" : "Pete Houston" + "drilldown" : "Pete Houston", + "y" : 2 }, { "name" : "Richard Park", - "y" : 1, - "drilldown" : "Richard Park" + "drilldown" : "Richard Park", + "y" : 1 }, { "y" : 5, @@ -540,19 +575,19 @@ "name" : "Roger Bell_West" }, { + "name" : "Shahed Nooshmand", "drilldown" : "Shahed Nooshmand", - "y" : 3, - "name" : "Shahed Nooshmand" + "y" : 3 }, { - "name" : "Simon Green", "drilldown" : "Simon Green", + "name" : "Simon Green", "y" : 3 }, { "drilldown" : "Simon Proctor", - "y" : 2, - "name" : "Simon Proctor" + "name" : "Simon Proctor", + "y" : 2 }, { "y" : 2, @@ -560,38 +595,22 @@ "name" : "Stuart Little" }, { - "drilldown" : "Ulrich Rieke", "y" : 4, + "drilldown" : "Ulrich Rieke", "name" : "Ulrich Rieke" }, { - "drilldown" : "Walt Mankowski", "y" : 2, + "drilldown" : "Walt Mankowski", "name" : "Walt Mankowski" }, { - "name" : "Wanderdoc", "y" : 2, + "name" : "Wanderdoc", "drilldown" : "Wanderdoc" } ], - "colorByPoint" : 1 - } - ], - "chart" : { - "type" : "column" - }, - "tooltip" : { - "followPointer" : 1, - "headerFormat" : "{series.name}
", - "pointFormat" : "{point.name}: {point.y:f}
" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" + "name" : "The Weekly Challenge - 070" } - }, - "legend" : { - "enabled" : 0 - } + ] } diff --git a/stats/pwc-challenge-213.json b/stats/pwc-challenge-213.json new file mode 100644 index 0000000000..02912c770b --- /dev/null +++ b/stats/pwc-challenge-213.json @@ -0,0 +1,702 @@ +{ + "subtitle" : { + "text" : "[Champions: 38] Last updated at 2023-04-25 10:52:08 GMT" + }, + "xAxis" : { + "type" : "category" + }, + "title" : { + "text" : "The Weekly Challenge - 213" + }, + "chart" : { + "type" : "column" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 + } + }, + "legend" : { + "enabled" : 0 + }, + "series" : [ + { + "name" : "The Weekly Challenge - 213", + "data" : [ + { + "y" : 3, + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer" + }, + { + "y" : 2, + "name" : "Athanasius", + "drilldown" : "Athanasius" + }, + { + "y" : 4, + "name" : "Avery Adams", + "drilldown" : "Avery Adams" + }, + { + "y" : 1, + "name" : "BarrOff", + "drilldown" : "BarrOff" + }, + { + "name" : "Bob Lied", + "drilldown" : "Bob Lied", + "y" : 2 + }, + { + "y" : 2, + "drilldown" : "Bruce Gray", + "name" : "Bruce Gray" + }, + { + "y" : 1, + "drilldown" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung" + }, + { + "y" : 2, + "name" : "David Ferrone", + "drilldown" : "David Ferrone" + }, + { + "name" : "Duncan C. White", + "drilldown" : "Duncan C. White", + "y" : 2 + }, + { + "name" : "E. Choroba", + "drilldown" : "E. Choroba", + "y" : 2 + }, + { + "name" : "Flavio Poletti", + "drilldown" : "Flavio Poletti", + "y" : 6 + }, + { + "y" : 5, + "name" : "Jaldhar H. Vyas", + "drilldown" : "Jaldhar H. Vyas" + }, + { + "y" : 3, + "drilldown" : "James Smith", + "name" : "James Smith" + }, + { + "name" : "Jan Krnavek", + "drilldown" : "Jan Krnavek", + "y" : 2 + }, + { + "y" : 2, + "drilldown" : "Jorg Sommrey", + "name" : "Jorg Sommrey" + }, + { + "y" : 3, + "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld" + }, + { + "y" : 1, + "drilldown" : "Leo Manfredi", + "name" : "Leo Manfredi" + }, + { + "y" : 2, + "drilldown" : "Lubos Kolouch", + "name" : "Lubos Kolouch" + }, + { + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari", + "y" : 8 + }, + { + "y" : 1, + "name" : "Mariano Spadaccini", + "drilldown" : "Mariano Spadaccini" + }, + { + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson", + "y" : 2 + }, + { + "name" : "Marton Polgar", + "drilldown" : "Marton Polgar", + "y" : 2 + }, + { + "y" : 1, + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh" + }, + { + "name" : "Matthias Muth", + "drilldown" : "Matthias Muth", + "y" : 3 + }, + { + "y" : 2, + "name" : "Niels van Dijke", + "drilldown" : "Niels van Dijke" + }, + { + "drilldown" : "Paulo Custodio", + "name" : "Paulo Custodio", + "y" : 2 + }, + { + "name" : "Peter Campbell Smith", + "drilldown" : "Peter Campbell Smith", + "y" : 3 + }, + { + "name" : "Peter Meszaros", + "drilldown" : "Peter Meszaros", + "y" : 2 + }, + { + "name" : "Pip Stuart", + "drilldown" : "Pip Stuart", + "y" : 4 + }, + { + "y" : 3, + "drilldown" : "Robbie Hatley", + "name" : "Robbie Hatley" + }, + { + "y" : 2, + "drilldown" : "Robert DiCicco", + "name" : "Robert DiCicco" + }, + { + "drilldown" : "Robert Ransbottom", + "name" : "Robert Ransbottom", + "y" : 1 + }, + { + "y" : 5, + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West" + }, + { + "name" : "Shimon Bollinger", + "drilldown" : "Shimon Bollinger", + "y" : 1 + }, + { + "y" : 2, + "name" : "Simon Green", + "drilldown" : "Simon Green" + }, + { + "name" : "Solathian", + "drilldown" : "Solathian", + "y" : 1 + }, + { + "name" : "Thomas Kohler", + "drilldown" : "Thomas Kohler", + "y" : 4 + }, + { + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "y" : 3 + } + ], + "colorByPoint" : 1 + } + ], + "drilldown" : { + "series" : [ + { + "id" : "Arne Sommer", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Arne Sommer" + }, + { + "name" : "Athanasius", + "data" : [ + [ + "Perl", + 1 + ], + [ + "Raku", + 1 + ] + ], + "id" : "Athanasius" + }, + { + "id" : "Avery Adams", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "name" : "Avery Adams" + }, + { + "id" : "BarrOff", + "data" : [ + [ + "Raku", + 1 + ] + ], + "name" : "BarrOff" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Bob Lied", + "id" : "Bob Lied" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Bruce Gray", + "id" : "Bruce Gray" + }, + { + "id" : "Cheok-Yin Fung", + "data" : [ + [ + "Perl", + 1 + ] + ], + "name" : "Cheok-Yin Fung" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "David Ferrone", + "id" : "David Ferrone" + }, + { + "name" : "Duncan C. White", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Duncan C. White" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "E. Choroba", + "id" : "E. Choroba" + }, + { + "id" : "Flavio Poletti", + "name" : "Flavio Poletti", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Jaldhar H. Vyas", + "id" : "Jaldhar H. Vyas" + }, + { + "id" : "James Smith", + "name" : "James Smith", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Jan Krnavek", + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Jan Krnavek" + }, + { + "id" : "Jorg Sommrey", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Jorg Sommrey" + }, + { + "id" : "Laurent Rosenfeld", + "data" : [ + [ + "Perl", + 1 + ], + [ + "Raku", + 1 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Laurent Rosenfeld" + }, + { + "id" : "Leo Manfredi", + "name" : "Leo Manfredi", + "data" : [ + [ + "Perl", + 1 + ] + ] + }, + { + "id" : "Lubos Kolouch", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Lubos Kolouch" + }, + { + "id" : "Luca Ferrari", + "name" : "Luca Ferrari", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 6 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 1 + ] + ], + "name" : "Mariano Spadaccini", + "id" : "Mariano Spadaccini" + }, + { + "name" : "Mark Anderson", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Mark Anderson" + }, + { + "name" : "Marton Polgar", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Marton Polgar" + }, + { + "id" : "Matthew Neleigh", + "data" : [ + [ + "Perl", + 1 + ] + ], + "name" : "Matthew Neleigh" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Matthias Muth", + "id" : "Matthias Muth" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Niels van Dijke", + "id" : "Niels van Dijke" + }, + { + "id" : "Paulo Custodio", + "name" : "Paulo Custodio", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "id" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Peter Meszaros", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Peter Meszaros" + }, + { + "name" : "Pip Stuart", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "id" : "Pip Stuart" + }, + { + "name" : "Robbie Hatley", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Robbie Hatley" + }, + { + "data" : [ + [ + "Perl", + 1 + ], + [ + "Raku", + 1 + ] + ], + "name" : "Robert DiCicco", + "id" : "Robert DiCicco" + }, + { + "data" : [ + [ + "Raku", + 1 + ] + ], + "name" : "Robert Ransbottom", + "id" : "Robert Ransbottom" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Roger Bell_West", + "id" : "Roger Bell_West" + }, + { + "id" : "Shimon Bollinger", + "name" : "Shimon Bollinger", + "data" : [ + [ + "Raku", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 1 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Simon Green", + "id" : "Simon Green" + }, + { + "id" : "Solathian", + "data" : [ + [ + "Perl", + 1 + ] + ], + "name" : "Solathian" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "name" : "Thomas Kohler", + "id" : "Thomas Kohler" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "W. Luis Mochan", + "id" : "W. Luis Mochan" + } + ] + }, + "tooltip" : { + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1 + } +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 977a248b59..fc842cabc7 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,225 +1,16 @@ { - "legend" : { - "enabled" : 0 - }, - "xAxis" : { - "type" : "category" - }, - "subtitle" : { - "text" : "[Champions: 38] Last updated at 2023-04-24 04:59:36 GMT" - }, "drilldown" : { "series" : [ { - "name" : "Arne Sommer", - "data" : [ - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Arne Sommer" - }, - { - "id" : "Athanasius", - "data" : [ - [ - "Perl", - 1 - ], - [ - "Raku", - 1 - ] - ], - "name" : "Athanasius" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 2 - ]