From dffe0c209b4764cc5fccdf7d234ce5c611a3ea85 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Wed, 24 May 2023 18:09:42 +0100 Subject: - Added solutions by Lubos Kolouch. - Added solutions by Ulrich Rieke. --- challenge-218/eric-cheung/python/ch-1.py | 26 + challenge-218/eric-cheung/python/ch-2.py | 51 + challenge-218/ulrich-rieke/cpp/ch-1.cpp | 45 + challenge-218/ulrich-rieke/cpp/ch-2.cpp | 176 ++++ challenge-218/ulrich-rieke/haskell/ch-1.hs | 22 + challenge-218/ulrich-rieke/haskell/ch-2.hs | 55 + challenge-218/ulrich-rieke/perl/ch-1.pl | 22 + challenge-218/ulrich-rieke/perl/ch-2.pl | 140 +++ challenge-218/ulrich-rieke/raku/ch-1.raku | 21 + challenge-218/ulrich-rieke/rust/ch-1.rs | 22 + stats/pwc-challenge-105.json | 219 ++-- stats/pwc-challenge-107.json | 545 +++++----- stats/pwc-current.json | 193 ++-- stats/pwc-language-breakdown-summary.json | 68 +- stats/pwc-language-breakdown.json | 1540 ++++++++++++++-------------- stats/pwc-leaders.json | 782 +++++++------- stats/pwc-summary-1-30.json | 114 +- stats/pwc-summary-121-150.json | 50 +- stats/pwc-summary-151-180.json | 48 +- stats/pwc-summary-181-210.json | 48 +- stats/pwc-summary-211-240.json | 48 +- stats/pwc-summary-241-270.json | 98 +- stats/pwc-summary-271-300.json | 50 +- stats/pwc-summary-31-60.json | 104 +- stats/pwc-summary-61-90.json | 30 +- stats/pwc-summary-91-120.json | 42 +- stats/pwc-summary.json | 614 +++++------ 27 files changed, 2903 insertions(+), 2270 deletions(-) create mode 100755 challenge-218/eric-cheung/python/ch-1.py create mode 100755 challenge-218/eric-cheung/python/ch-2.py create mode 100644 challenge-218/ulrich-rieke/cpp/ch-1.cpp create mode 100644 challenge-218/ulrich-rieke/cpp/ch-2.cpp create mode 100644 challenge-218/ulrich-rieke/haskell/ch-1.hs create mode 100644 challenge-218/ulrich-rieke/haskell/ch-2.hs create mode 100644 challenge-218/ulrich-rieke/perl/ch-1.pl create mode 100644 challenge-218/ulrich-rieke/perl/ch-2.pl create mode 100644 challenge-218/ulrich-rieke/raku/ch-1.raku create mode 100644 challenge-218/ulrich-rieke/rust/ch-1.rs diff --git a/challenge-218/eric-cheung/python/ch-1.py b/challenge-218/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..8c79d7a99d --- /dev/null +++ b/challenge-218/eric-cheung/python/ch-1.py @@ -0,0 +1,26 @@ + +## arrInputList = [3, 1, 2] ## Example 1 +## arrInputList = [4, 1, 3, 2] ## Example 2 +## arrInputList = [-1, 0, 1, 3, 1] ## Example 3 +arrInputList = [-8, 2, -9, 0, -4, 3] ## Example 4 + +arrInterList = sorted(arrInputList) +arrNegInterList = [nElem for nElem in arrInterList if nElem < 0] + +arrOutputList = [] +if len(arrNegInterList) <= 1: + arrOutputList = arrInterList[-3:] +else: + nTempIndx = max(int((len(arrNegInterList) + (0 if len(arrNegInterList) % 2 == 0 else 1)) / 2), 2) + + for nElem in arrNegInterList[:nTempIndx]: + arrOutputList.append(nElem) + + for nElem in arrInterList[-3 + len(arrOutputList):]: + arrOutputList.append(nElem) + +nProduct = 1 +for nElem in arrOutputList: + nProduct = nProduct * nElem + +print (nProduct) diff --git a/challenge-218/eric-cheung/python/ch-2.py b/challenge-218/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..682949d9c2 --- /dev/null +++ b/challenge-218/eric-cheung/python/ch-2.py @@ -0,0 +1,51 @@ + +arrMatrix = [[0, 0, 1, 1], [1, 0, 1, 0], [1, 1, 0, 0]] +## arrMatrix = [[0]] ## Example 2 + +nMatrixSum = 0 + +def GetSum (arrInputMat): + + nSum = 0 + + for nIndx in range(0, len(arrInputMat)): + nSum = nSum + int("".join([str(nElem) for nElem in arrInputMat[nIndx]]), 2) + + return nSum + +def SwapAlongRow (arrInputMat, nRowIndx): + + for nIndx in range(0, len(arrMatrix[0])): + arrInputMat[nRowIndx][nIndx] = 1 - arrInputMat[nRowIndx][nIndx] + + return + +def SwapAlongCol (arrInputMat, nColIndx): + + for nIndx in range(0, len(arrMatrix)): + arrInputMat[nIndx][nColIndx] = 1 - arrInputMat[nIndx][nColIndx] + + return + + +if len(arrMatrix) == 1 and len(arrMatrix[0]) == 1: + print (1) +else: + ## Swap Along Rows + for nRowLoopIndx in range(0, len(arrMatrix)): + arrTempMatrix = [arrRow[:] for arrRow in arrMatrix] + SwapAlongRow (arrTempMatrix, nRowLoopIndx) + if GetSum (arrTempMatrix) > nMatrixSum: + SwapAlongRow (arrMatrix, nRowLoopIndx) + nMatrixSum = GetSum (arrMatrix) + + ## Swap Along Columns + for nColLoopIndx in range(0, len(arrMatrix[0])): + arrTempMatrix = [arrRow[:] for arrRow in arrMatrix] + SwapAlongCol (arrTempMatrix, nColLoopIndx) + if GetSum (arrTempMatrix) > nMatrixSum: + SwapAlongCol (arrMatrix, nColLoopIndx) + nMatrixSum = GetSum (arrMatrix) + + ## print (arrMatrix) + print (nMatrixSum) diff --git a/challenge-218/ulrich-rieke/cpp/ch-1.cpp b/challenge-218/ulrich-rieke/cpp/ch-1.cpp new file mode 100644 index 0000000000..de7fa6670f --- /dev/null +++ b/challenge-218/ulrich-rieke/cpp/ch-1.cpp @@ -0,0 +1,45 @@ +#include +#include +#include +#include +#include + +std::vector split( const std::string & startline , + const std::string & sep ) { + std::vector separated ; + std::string::size_type start { 0 } ; + std::string::size_type pos ; + do { + pos = startline.find_first_of( sep , start ) ; + separated.push_back( startline.substr(start , pos - start )) ; + start = pos + 1 ; + } while ( pos != std::string::npos ) ; + return separated ; +} + +int main( ) { + std::cout << "Enter at least 3 integers, separated by blanks!\n" ; + std::string line ; + std::getline( std::cin , line ) ; + std::vector numberstrings( split( line , " " )) ; + std::vector numbers ; + for ( auto s : numberstrings ) + numbers.push_back( std::stoi( s ) ) ; + if ( numbers.size( ) == 3 ) { + std::cout << std::accumulate( numbers.begin( ) , numbers.end( ) , 1 , + std::multiplies( ) ) << '\n' ; + } + else { + int len = numbers.size( ) ; + std::vector products ; + for ( int i = 0 ; i < len - 2 ; i++ ) { + for ( int j = i + 1 ; j < len - 1 ; j++ ) { + for ( int k = j + 1 ; k < len ; k++ ) { + products.push_back( numbers[ i ] * numbers[ j ] * numbers[ k ] ) ; + } + } + } + std::cout << *max_element( products.begin( ) , products.end( ) ) << '\n' ; + } + return 0 ; +} diff --git a/challenge-218/ulrich-rieke/cpp/ch-2.cpp b/challenge-218/ulrich-rieke/cpp/ch-2.cpp new file mode 100644 index 0000000000..f448c8ef27 --- /dev/null +++ b/challenge-218/ulrich-rieke/cpp/ch-2.cpp @@ -0,0 +1,176 @@ +#include +#include +#include +#include +#include +#include + +std::vector split( const std::string & startline , + const std::string & sep ) { + std::vector separated ; + std::string::size_type start { 0 } ; + std::string::size_type pos ; + do { + pos = startline.find_first_of( sep , start ) ; + separated.push_back( startline.substr(start , pos - start )) ; + start = pos + 1 ; + } while ( pos != std::string::npos ) ; + return separated ; +} + +std::vector toggle ( const std::vector & aVec ) { + std::vector toggled ; + for ( int i : aVec ) { + if ( i == 0 ) { + toggled.push_back( 1 ) ; + } + else { + toggled.push_back( 0 ) ; + } + } + return toggled ; +} + +std::vector> toggle_row( const std::vector> + & input , int row) { + std::vector> toggled ; + int matrixlen = input.size( ) ; + for ( int i = 0 ; i < matrixlen ; i++ ) { + if ( i == row ) + toggled.push_back( toggle( input[ i ] )) ; + else + toggled.push_back( input[ i ] ) ; + } + return toggled ; +} + +std::vector> transpose( const std::vector> + & matrix ) { + int len = matrix.size( ) ; + int rowlen = matrix[0].size( ) ; + std::vector current_column ; + std::vector> transposed ; + for ( int c = 0 ; c < rowlen ; c++ ) { + for ( int r = 0 ; r < len ; r++ ) { + current_column.push_back( matrix[ r ][ c ] ) ; + } + transposed.push_back( current_column ) ; + current_column.clear( ) ; + } + return transposed ; +} + +int to_binary_sum( const std::vector> & matrix ) { + int sum = 0 ; + int len = matrix[0].size( ) ; + for ( int r = 0 ; r < matrix.size( ) ; r++ ) { + for ( int i = 0 ; i < len ; i++ ) { + double result = std::pow( 2.0 , static_cast( len - i - 1 ) ) * + matrix[r][i] ; + sum += static_cast( result ) ; + } + } + return sum ; +} + +int main( ) { + std::cout << "Please enter some 1 and 0 , separated by blanks, end to end!\n" ; + std::vector> matrix ; + std::string line ; + std::getline( std::cin , line ) ; + while ( line != "end" ) { + std::vector numbers ( split( line , " " ) ) ; + std::vector row ; + for ( auto s : numbers ) { + row.push_back( std::stoi( s ) ) ; + } + matrix.push_back( row ) ; + std::getline( std::cin , line ) ; + } + int matrixlen = matrix.size( ) ; + if ( matrixlen == 1 ) { + std::vector toggled ( toggle( matrix[ 0 ] ) ) ; + int sum = 0 ; + int rowlen = toggled.size( ) ; + for ( int i = 0 ; i < rowlen ; i++ ) { + double result = std::pow( 2.0 , static_cast( rowlen + - i - 1 )) * toggled[ i ] ; + sum += static_cast( result ) ; + } + std::cout << sum << std::endl ; + return 1 ; + } + else { + std::vector binary_row_sums ; //for the sums of binary rows for + //the toggling of every row and column + std::vector all_maxima ; //for the maximal values of all toggled + //matrices + int rowlen = matrix[0].size( ) ; + int startvalue = to_binary_sum( matrix ) ; + //if all toggling results in a binary sum that is less than startvalue + //we can stop + for ( int r = 0 ; r < matrixlen ; r++ ) { + std::vector> toggled ( toggle_row( matrix , r ) ) ; + binary_row_sums.push_back( to_binary_sum( toggled ) ) ; + } + std::vector> transposed ( transpose( matrix ) ) ; + for ( int c = 0 ; c < rowlen ; c++ ) { + std::vector> transpo_toggle ( toggle_row( + transposed , c ) ) ; + std::vector> toggled( transpose( transpo_toggle )) ; + binary_row_sums.push_back( to_binary_sum( toggled )) ; + } + int maximum = *std::max_element( binary_row_sums.begin( ) , + binary_row_sums.end( ) ) ; + if ( maximum < startvalue ) { //we're done and can stop toggling + std::cout << maximum << std::endl ; + return 0 ; + } + else { + all_maxima.push_back( maximum ) ; + std::vector> current_matrix( matrix ) ; + //the matrix that corresponds to the maximum binary sum is + //reconstructed as new current matrix. Then we repeat toggling + //every row and column and find the new maximum. As long as the + //new maximum is greater than the last maximum, we carry on ; + //otherwise, we return the second from the end of all_maxima + while ( all_maxima.size( ) == 1 || all_maxima.back( ) > + all_maxima[ all_maxima.size( ) - 2] ) { + auto found = std::find( binary_row_sums.begin( ) , + binary_row_sums.end( ) , maximum ) ; + int max_pos = static_cast( std::distance( + binary_row_sums.begin( ) , found )) ; + if ( max_pos < matrixlen ) { //maximum resulted from row toggle + std::vector> temp_matrix( toggle_row( + current_matrix , max_pos )) ; + current_matrix = temp_matrix ; + } + else { //maximum resulted from column toggle + transposed = transpose( current_matrix ) ; + std::vector> transpo_toggled = + toggle_row( transposed , max_pos - matrixlen ) ; + current_matrix = transpose( transpo_toggled ) ; + } + binary_row_sums.clear( ) ; //we start toggling anew, new sums! + for ( int r = 0 ; r < matrixlen ; r++ ) { + std::vector> toggled = + toggle_row( current_matrix , r ) ; + binary_row_sums.push_back( to_binary_sum( toggled )) ; + } + transposed = transpose( current_matrix ) ; + for ( int c = 0 ; c < rowlen ; c++ ) { + std::vector> transpo_toggled = + toggle_row( transposed , c ) ; + std::vector> toggled (transpose( + transpo_toggled )) ; + binary_row_sums.push_back( to_binary_sum( toggled ) ) ; + } + maximum = *std::max_element( binary_row_sums.begin( ) , + binary_row_sums.end( ) ) ; + all_maxima.push_back( maximum ) ; + } + std::cout << all_maxima[ all_maxima.size( ) - 2] << std::endl ; + } + } + return 0 ; +} diff --git a/challenge-218/ulrich-rieke/haskell/ch-1.hs b/challenge-218/ulrich-rieke/haskell/ch-1.hs new file mode 100644 index 0000000000..5b86d64696 --- /dev/null +++ b/challenge-218/ulrich-rieke/haskell/ch-1.hs @@ -0,0 +1,22 @@ +module Challenge218 + where +import Data.List ( (!!) ) + +combi_of_three :: [Int] -> [[Int]] +combi_of_three list = [[list !! i , list !! j , list !! k] | i <- [0..l - 3] , +j <- [i + 1..l - 2] , k <- [j + 1..l - 1]] +where + l :: Int + l = length list + +solution :: [Int] -> Int +solution list + |length list == 3 = product list + |otherwise = maximum $ map product $ combi_of_three list + +main :: IO ( ) +main = do + putStrLn "Enter at least 3 integers, separated by blanks!" + numberstring <- getLine + let numbers = map read $ words numberstring + print $ solution numbers diff --git a/challenge-218/ulrich-rieke/haskell/ch-2.hs b/challenge-218/ulrich-rieke/haskell/ch-2.hs new file mode 100644 index 0000000000..b40991078f --- /dev/null +++ b/challenge-218/ulrich-rieke/haskell/ch-2.hs @@ -0,0 +1,55 @@ +module Challenge218_2 + where +import Data.List ( (!!) , transpose , sortOn ) +import Control.Monad.State.Lazy + +toggle :: [Int] -> [Int] +toggle list = map (\n -> if n == 1 then 0 else 1 ) list + +to_row_sum :: [Int] -> Int +to_row_sum list = sum $ map (\i -> 2 ^ i * ( list !! (l - i - 1))) +[0..l - 1] +where + l :: Int + l = length list + +do_all_toggles :: [[Int]] -> [[[Int]]] +do_all_toggles matrix = map (\i -> toggleRow i matrix) [0..length matrix - 1] +++ map (\n -> toggleColumn n matrix ) [0..(length ( matrix !! 0 ) - 1)] + where + toggleRow :: Int -> [[Int]] -> [[Int]] + toggleRow aRow aMatrix = map (\i -> if i == aRow then + toggle ( matrix !! i ) else matrix !! i ) [0..length aMatrix - 1] + +toggleColumn :: Int -> [[Int]] -> [[Int]] +toggleColumn column matrix = transpose $ map (\i -> if i == column then toggle +( transposed !! i ) else transposed !! i ) [0..length transposed - 1] + where + transposed :: [[Int]] + transposed = transpose matrix + +find_maximum_toggle :: [[[Int]]] -> (Int , [[Int]]) +find_maximum_toggle allTogglings = last $ sortOn fst $ map (\aMatrix -> + (matrixSum aMatrix , aMatrix )) allTogglings + where + matrixSum :: [[Int]] -> Int + matrixSum someMatrix = sum $ map to_row_sum someMatrix + +findMaxSum :: State ((Int , [[Int]] ),[Int] ) Int +findMaxSum = do + ((maxVal , matrix) , allmaxima) <- get + let l = length allmaxima + if l > 1 && (allmaxima !! ( l - 1 )) < ( allmaxima !! + ( l - 2 )) + then + return $ allmaxima !! (l - 2) + else do + let (m , toggles ) = find_maximum_toggle $ do_all_toggles matrix + put (( m , toggles ) , allmaxima ++ [m] ) + findMaxSum + +solution :: [[Int]] -> Int +solution input + |length input == 1 = to_row_sum $ toggle $ input !! 0 + |otherwise = evalState findMaxSum ( find_maximum_toggle $ + do_all_toggles input , [] ) diff --git a/challenge-218/ulrich-rieke/perl/ch-1.pl b/challenge-218/ulrich-rieke/perl/ch-1.pl new file mode 100644 index 0000000000..f9527b9713 --- /dev/null +++ b/challenge-218/ulrich-rieke/perl/ch-1.pl @@ -0,0 +1,22 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use Algorithm::Combinatorics qw ( combinations ) ; +use List::Util qw ( product max ) ; + +say "Enter at least 3 integers, separated by blanks!" ; +my $line = ; +chomp $line ; +my @numbers = split( /\s/ , $line ) ; +if ( scalar( @numbers ) == 3 ) { + say product( @numbers ) ; +} +else { + my @products ; + my $iter = combinations( \@numbers , 3 ) ; + while ( my $c = $iter->next ) { + push @products , product( @{$c} ) ; + } + say max( @products ) ; +} diff --git a/challenge-218/ulrich-rieke/perl/ch-2.pl b/challenge-218/ulrich-rieke/perl/ch-2.pl new file mode 100644 index 0000000000..fa66a62438 --- /dev/null +++ b/challenge-218/ulrich-rieke/perl/ch-2.pl @@ -0,0 +1,140 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use List::Util qw ( max ) ; + +sub toggle_row { + my $array = shift ; + my $row = shift ; + my @changed_array = @{$array} ;#dereference to preserve the original array! + my @subarray = @{$changed_array[$row]} ; + for my $i ( 0..scalar(@subarray) - 1 ) { + if ( $subarray[ $i ] == 0 ) { + $subarray[ $i ] = 1 ; + } + else { + $subarray[ $i ] = 0 ; + } + } + $changed_array[ $row ] = [ @subarray ] ; + return @changed_array ; +} + +sub toggle_column { + my $array = shift ; + my $column = shift ; + my @changed_array ; + for my $ar ( @{$array} ) { + my @subarray = @{$ar} ; + if ( $subarray[ $column ] == 0 ) { + $subarray[ $column ] = 1 ; + } + else { + $subarray[ $column ] = 0 ; + } + push @changed_array , [ @subarray ] ; + } + return @changed_array ; +} + +sub find_index { + my $searched = shift ; + my $array = shift ; + my $pos = 0 ; + while ( $array->[$pos] != $searched ) { + $pos++ ; + } + return $pos ; +} + +sub to_binary_sum { + my $array = shift ; + my $sum = 0 ; + for my $subarray( @{$array} ) { + my $sublen = scalar( @{$subarray} ) ; + for my $i (0..$sublen - 1 ) { + $sum += 2 ** ($sublen - 1 - $i ) * $subarray->[ $i ] ; + } + } + return $sum ; +} + + +say "Enter an m x n array of 0 and 1 only, blanks to separate!" ; +say "Enter end to end!" ; +my @matrix ; +my $line = ; +my $maximum ; #the maximum of all moves of a given matrix +chomp $line ; +while ( $line ne "end" ) { + my @numbers = split( /\s/ , $line ) ; + push @matrix, \@numbers ; + $line = ; + chomp $line ; +} +my $matrixlen = scalar( @matrix ) ; +my $rowlen = scalar( @{$matrix[0]} ) ; +if ( $matrixlen == 1 ) { + my @toggled = toggle_row( \@matrix , 0 ) ; + say to_binary_sum( \@toggled ) ; +} +else { + my @matrix_bin_sums ; #holds the binary row sums of all transformations of a +#given matrix + my @all_maxima ; #holds the maxima of all transformations + for my $r (0..$matrixlen - 1 ) { + my @toggled = toggle_row( \@matrix , $r ) ; + push @matrix_bin_sums , to_binary_sum( \@toggled ) ; + } + for my $c (0..$rowlen - 1) { + my @toggled = toggle_column( \@matrix , $c ) ; + push @matrix_bin_sums , to_binary_sum( \@toggled ) ; + } + $maximum = max(@matrix_bin_sums) ; + push @all_maxima, $maximum ; + if ( $maximum < to_binary_sum( \@matrix )) { #we don't improve on toggling + say $maximum ; + } + else { +#we find the maximum binary sum which results from toggling every row and every +#column of a given matrix. Once we've got it, we reconstruct the matrix that +#produces that maximum. For that , we find the position of the maximum in the +#@matrix_bin_sums array. Since we toggle the rows first and the columns next, we +#can derive the matrix that produced the maximum. It becomes our new current matrix. +#We continue until the values of the maxima begin to fall. We then return the former +#greatest maximum + my @current_matrix ; + for my $ar ( @matrix ) { #we duplicate the start matrix to have a current +#matrix which we keep changing until the above condition is fulfilled + push @current_matrix , $ar ; + } + while ( scalar( @all_maxima ) == 1 || $all_maxima[-1] > $all_maxima[ -2 ] ) { + my $pos = find_index( $maximum , \@matrix_bin_sums ) ; + my @toggled ; + if ( $pos < $matrixlen ) { + @toggled = toggle_row( \@current_matrix, $pos ) ; + } + else { + @toggled = toggle_column( \@current_matrix, $pos - $matrixlen ) ; + } + @current_matrix = ( ) ; #we must unset this variable to overwrite with the +#toggle position that produced the maximum + @matrix_bin_sums = ( ) ; #new matrix , new binary row sums! + for my $ar( @toggled ) { + push @current_matrix , $ar ; + } + for my $r (0..$matrixlen - 1 ) { + @toggled = toggle_row( \@current_matrix , $r ) ; + push @matrix_bin_sums, to_binary_sum( \@toggled ) ; + } + for my $c (0..$rowlen - 1 ) { + @toggled = toggle_column( \@current_matrix, $c ) ; + push @matrix_bin_sums , to_binary_sum( \@toggled ) ; + } + $maximum = max( @matrix_bin_sums ) ; + push @all_maxima , $maximum ; + } + say $all_maxima[-2] ; + } +} diff --git a/challenge-218/ulrich-rieke/raku/ch-1.raku b/challenge-218/ulrich-rieke/raku/ch-1.raku new file mode 100644 index 0000000000..1a02fe2f5b --- /dev/null +++ b/challenge-218/ulrich-rieke/raku/ch-1.raku @@ -0,0 +1,21 @@ +use v6 ; + +say "Please enter at least 3 integers, separated by blanks!" ; +my $line = $*IN.get ; +my @numbers = $line.words.map( {.Int} ) ; +if ( @numbers.elems == 3 ) { + say [*] @numbers ; +} +else { + my @products ; + my @combinations = @numbers.combinations( 3 ) ; + for @combinations -> $combi { + my $prod = 1 ; + for (0..2) -> $i { + $prod *= $combi[ $i ] ; + } + @products.push( $prod ) ; + } + my @sorted = @products.sort( { $^b <=> $^a } ) ; + say @sorted[ 0 ] ; +} diff --git a/challenge-218/ulrich-rieke/rust/ch-1.rs b/challenge-218/ulrich-rieke/rust/ch-1.rs new file mode 100644 index 0000000000..a23cffc9e4 --- /dev/null +++ b/challenge-218/ulrich-rieke/rust/ch-1.rs @@ -0,0 +1,22 @@ +use std::io ; +use itertools::Itertools ; + +fn main() { + println!("Enter at least 3 integers, separated by blanks!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = &*inline ; + let numbers : Vec = entered_line.split_whitespace( ).map ( | s | + s.trim( ).parse::( ).unwrap( ) ).collect( ) ; + if numbers.len( ) == 3 { + println!("{}" , numbers.iter( ).product::( ) ) ; + } + else { + let mut products : Vec = Vec::new( ) ; + let it = numbers.into_iter( ).combinations( 3 ) ; + for a_vec in it { + products.push( a_vec.iter( ).product( ) ) ; + } + println!("{}" , products.iter( ).max( ).unwrap( ) ) ; + } +} diff --git a/stats/pwc-challenge-105.json b/stats/pwc-challenge-105.json index 62c8a1db32..b0678c0e2b 100644 --- a/stats/pwc-challenge-105.json +++ b/stats/pwc-challenge-105.json @@ -1,13 +1,24 @@ { - "subtitle" : { - "text" : "[Champions: 26] Last updated at 2021-07-04 09:37:10 GMT" - }, - "xAxis" : { - "type" : "category" + "tooltip" : { + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1, + "headerFormat" : "{series.name}
" }, "chart" : { "type" : "column" }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 + } + }, + "xAxis" : { + "type" : "category" + }, "legend" : { "enabled" : 0 }, @@ -16,38 +27,39 @@ "text" : "Total Solutions" } }, + "subtitle" : { + "text" : "[Champions: 27] Last updated at 2023-05-24 16:59:49 GMT" + }, "title" : { "text" : "The Weekly Challenge - 105" }, "series" : [ { - "name" : "The Weekly Challenge - 105", - "colorByPoint" : 1, "data" : [ { - "y" : 3, "drilldown" : "Aaron Smith", - "name" : "Aaron Smith" + "name" : "Aaron Smith", + "y" : 3 }, { - "name" : "Abigail", "drilldown" : "Abigail", - "y" : 3 + "y" : 3, + "name" : "Abigail" }, { "drilldown" : "Adam Russell", - "name" : "Adam Russell", - "y" : 3 + "y" : 3, + "name" : "Adam Russell" }, { "name" : "Arne Sommer", - "drilldown" : "Arne Sommer", - "y" : 5 + "y" : 5, + "drilldown" : "Arne Sommer" }, { "name" : "Cheok-Yin Fung", - "drilldown" : "Cheok-Yin Fung", - "y" : 1 + "y" : 1, + "drilldown" : "Cheok-Yin Fung" }, { "drilldown" : "Colin Crain", @@ -61,8 +73,8 @@ }, { "drilldown" : "Dave Jacoby", - "name" : "Dave Jacoby", - "y" : 3 + "y" : 3, + "name" : "Dave Jacoby" }, { "y" : 2, @@ -70,18 +82,18 @@ "drilldown" : "Duncan C. White" }, { - "name" : "E. Choroba", "drilldown" : "E. Choroba", + "name" : "E. Choroba", "y" : 2 }, { - "drilldown" : "Flavio Poletti", + "y" : 4, "name" : "Flavio Poletti", - "y" : 4 + "drilldown" : "Flavio Poletti" }, { - "y" : 5, "drilldown" : "Jaldhar H. Vyas", + "y" : 5, "name" : "Jaldhar H. Vyas" }, { @@ -90,49 +102,54 @@ "y" : 3 }, { + "name" : "Jan Krnavek", "y" : 1, - "drilldown" : "Jan Krnavek", - "name" : "Jan Krnavek" + "drilldown" : "Jan Krnavek" }, { - "y" : 2, "drilldown" : "Joan Mimosinnet", + "y" : 2, "name" : "Joan Mimosinnet" }, { + "y" : 2, "name" : "Jorg Sommrey", - "drilldown" : "Jorg Sommrey", - "y" : 2 + "drilldown" : "Jorg Sommrey" }, { "y" : 5, - "drilldown" : "Laurent Rosenfeld", - "name" : "Laurent Rosenfeld" + "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld" + }, + { + "drilldown" : "Lubos Kolouch", + "y" : 2, + "name" : "Lubos Kolouch" }, { - "name" : "Luca Ferrari", "drilldown" : "Luca Ferrari", - "y" : 4 + "y" : 4, + "name" : "Luca Ferrari" }, { - "drilldown" : "Mark Anderson", "name" : "Mark Anderson", - "y" : 2 + "y" : 2, + "drilldown" : "Mark Anderson" }, { + "drilldown" : "Niels van Dijke", "y" : 1, - "name" : "Niels van Dijke", - "drilldown" : "Niels van Dijke" + "name" : "Niels van Dijke" }, { "name" : "Paulo Custodio", - "drilldown" : "Paulo Custodio", - "y" : 2 + "y" : 2, + "drilldown" : "Paulo Custodio" }, { "y" : 2, - "drilldown" : "Pete Houston", - "name" : "Pete Houston" + "name" : "Pete Houston", + "drilldown" : "Pete Houston" }, { "y" : 5, @@ -141,36 +158,24 @@ }, { "drilldown" : "Stuart Little", - "name" : "Stuart Little", - "y" : 4 + "y" : 4, + "name" : "Stuart Little" }, { "y" : 4, - "drilldown" : "Ulrich Rieke", - "name" : "Ulrich Rieke" + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke" }, { "drilldown" : "Wanderdoc", - "name" : "Wanderdoc", - "y" : 1 + "y" : 1, + "name" : "Wanderdoc" } - ] + ], + "name" : "The Weekly Challenge - 105", + "colorByPoint" : 1 } ], - "plotOptions" : { - "series" : { - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - }, - "borderWidth" : 0 - } - }, - "tooltip" : { - "headerFormat" : "{series.name}
", - "pointFormat" : "{point.name}: {point.y:f}
", - "followPointer" : 1 - }, "drilldown" : { "series" : [ { @@ -188,7 +193,7 @@ "id" : "Aaron Smith" }, { - "id" : "Abigail", + "name" : "Abigail", "data" : [ [ "Perl", @@ -199,11 +204,11 @@ 1 ] ], - "name" : "Abigail" + "id" : "Abigail" }, { - "name" : "Adam Russell", "id" : "Adam Russell", + "name" : "Adam Russell", "data" : [ [ "Perl", @@ -217,6 +222,7 @@ }, { "id" : "Arne Sommer", + "name" : "Arne Sommer", "data" : [ [ "Perl", @@ -230,20 +236,20 @@ "Blog", 1 ] - ], - "name" : "Arne Sommer" + ] }, { "id" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung", "data" : [ [ "Perl", 1 ] - ], - "name" : "Cheok-Yin Fung" + ] }, { + "name" : "Colin Crain", "data" : [ [ "Perl", @@ -258,20 +264,20 @@ 1 ] ], - "id" : "Colin Crain", - "name" : "Colin Crain" + "id" : "Colin Crain" }, { + "id" : "Cristina Heredia", + "name" : "Cristina Heredia", "data" : [ [ "Perl", 1 ] - ], - "id" : "Cristina Heredia", - "name" : "Cristina Heredia" + ] }, { + "id" : "Dave Jacoby", "data" : [ [ "Perl", @@ -282,30 +288,31 @@ 1 ] ], - "id" : "Dave Jacoby", "name" : "Dave Jacoby" }, { - "name" : "Duncan C. White", + "id" : "Duncan C. White", "data" : [ [ "Perl", 2 ] ], - "id" : "Duncan C. White" + "name" : "Duncan C. White" }, { - "name" : "E. Choroba", "id" : "E. Choroba", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "E. Choroba" }, { + "id" : "Flavio Poletti", + "name" : "Flavio Poletti", "data" : [ [ "Perl", @@ -315,9 +322,7 @@ "Blog", 2 ] - ], - "id" : "Flavio Poletti", - "name" : "Flavio Poletti" + ] }, { "name" : "Jaldhar H. Vyas", @@ -352,8 +357,8 @@ "id" : "James Smith" }, { - "name" : "Jan Krnavek", "id" : "Jan Krnavek", + "name" : "Jan Krnavek", "data" : [ [ "Raku", @@ -362,27 +367,27 @@ ] }, { - "id" : "Joan Mimosinnet", "data" : [ [ "Raku", 2 ] ], - "name" : "Joan Mimosinnet" + "name" : "Joan Mimosinnet", + "id" : "Joan Mimosinnet" }, { "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey", "data" : [ [ "Perl", 2 ] - ], - "name" : "Jorg Sommrey" + ] }, { - "name" : "Laurent Rosenfeld", + "id" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -397,11 +402,21 @@ 1 ] ], - "id" : "Laurent Rosenfeld" + "name" : "Laurent Rosenfeld" + }, + { + "id" : "Lubos Kolouch", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Lubos Kolouch" }, { - "name" : "Luca Ferrari", "id" : "Luca Ferrari", + "name" : "Luca Ferrari", "data" : [ [ "Raku", @@ -414,14 +429,14 @@ ] }, { - "id" : "Mark Anderson", "data" : [ [ "Raku", 2 ] ], - "name" : "Mark Anderson" + "name" : "Mark Anderson", + "id" : "Mark Anderson" }, { "data" : [ @@ -430,17 +445,17 @@ 1 ] ], - "id" : "Niels van Dijke", - "name" : "Niels van Dijke" + "name" : "Niels van Dijke", + "id" : "Niels van Dijke" }, { + "id" : "Paulo Custodio", "data" : [ [ "Perl", 2 ] ], - "id" : "Paulo Custodio", "name" : "Paulo Custodio" }, { @@ -450,10 +465,11 @@ 2 ] ], - "id" : "Pete Houston", - "name" : "Pete Houston" + "name" : "Pete Houston", + "id" : "Pete Houston" }, { + "name" : "Roger Bell_West", "data" : [ [ "Perl", @@ -468,8 +484,7 @@ 1 ] ], - "id" : "Roger Bell_West", - "name" : "Roger Bell_West" + "id" : "Roger Bell_West" }, { "id" : "Stuart Little", @@ -486,6 +501,7 @@ "name" : "Stuart Little" }, { + "id" : "Ulrich Rieke", "name" : "Ulrich Rieke", "data" : [ [ @@ -496,18 +512,17 @@ "Raku", 2 ] - ], - "id" : "Ulrich Rieke" + ] }, { - "name" : "Wanderdoc", + "id" : "Wanderdoc", "data" : [ [ "Perl", 1 ] ], - "id" : "Wanderdoc" + "name" : "Wanderdoc" } ] } diff --git a/stats/pwc-challenge-107.json b/stats/pwc-challenge-107.json index 0d718702a8..603d2db654 100644 --- a/stats/pwc-challenge-107.json +++ b/stats/pwc-challenge-107.json @@ -1,199 +1,13 @@ { - "series" : [ - { - "colorByPoint" : 1, - "name" : "Perl Weekly Challenge - 107", - "data" : [ - { - "y" : 3, - "name" : "Aaron Smith", - "drilldown" : "Aaron Smith" - }, - { - "drilldown" : "Abigail", - "name" : "Abigail", - "y" : 4 - }, - { - "y" : 3, - "name" : "Adam Russell", - "drilldown" : "Adam Russell" - }, - { - "y" : 3, - "name" : "Arne Sommer", - "drilldown" : "Arne Sommer" - }, - { - "y" : 2, - "drilldown" : "Athanasius", - "name" : "Athanasius" - }, - { - "name" : "Cheok-Yin Fung", - "drilldown" : "Cheok-Yin Fung", - "y" : 2 - }, - { - "y" : 5, - "name" : "Colin Crain", - "drilldown" : "Colin Crain" - }, - { - "name" : "Dave Jacoby", - "drilldown" : "Dave Jacoby", - "y" : 3 - }, - { - "name" : "Duncan C. White", - "drilldown" : "Duncan C. White", - "y" : 2 - }, - { - "y" : 2, - "name" : "E. Choroba", - "drilldown" : "E. Choroba" - }, - { - "name" : "Flavio Poletti", - "drilldown" : "Flavio Poletti", - "y" : 4 - }, - { - "y" : 5, - "name" : "Jaldhar H. Vyas", - "drilldown" : "Jaldhar H. Vyas" - }, - { - "drilldown" : "James Smith", - "name" : "James Smith", - "y" : 3 - }, - { - "drilldown" : "Jan Krnavek", - "name" : "Jan Krnavek", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Joan Mimosinnet", - "name" : "Joan Mimosinnet" - }, - { - "y" : 2, - "drilldown" : "Jorg Sommrey", - "name" : "Jorg Sommrey" - }, - { - "y" : 2, - "name" : "Lance Wicks", - "drilldown" : "Lance Wicks" - }, - { - "drilldown" : "Laurent Rosenfeld", - "name" : "Laurent Rosenfeld", - "y" : 5 - }, - { - "y" : 4, - "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari" - }, - { - "y" : 2, - "name" : "Mark Anderson", - "drilldown" : "Mark Anderson" - }, - { - "drilldown" : "Mohammad S Anwar", - "name" : "Mohammad S Anwar", - "y" : 3 - }, - { - "y" : 2, - "name" : "Niels van Dijke", - "drilldown" : "Niels van Dijke" - }, - { - "drilldown" : "PJ Durai", - "name" : "PJ Durai", - "y" : 1 - }, - { - "drilldown" : "Paulo Custodio", - "name" : "Paulo Custodio", - "y" : 2 - }, - { - "drilldown" : "Pete Houston", - "name" : "Pete Houston", - "y" : 2 - }, - { - "y" : 5, - "name" : "Roger Bell_West", - "drilldown" : "Roger Bell_West" - }, - { - "name" : "Simon Green", - "drilldown" : "Simon Green", - "y" : 3 - }, - { - "y" : 4, - "drilldown" : "Stuart Little", - "name" : "Stuart Little" - }, - { - "y" : 3, - "drilldown" : "Ulrich Rieke", - "name" : "Ulrich Rieke" - }, - { - "drilldown" : "W. Luis Mochan", - "name" : "W. Luis Mochan", - "y" : 3 - }, - { - "y" : 2, - "name" : "Wanderdoc", - "drilldown" : "Wanderdoc" - } - ] - } - ], - "tooltip" : { - "followPointer" : 1, - "headerFormat" : "{series.name}
", - "pointFormat" : "{point.name}: {point.y:f}
" - }, "title" : { - "text" : "Perl Weekly Challenge - 107" + "text" : "The Weekly Challenge - 107" }, - "legend" : { - "enabled" : 0 - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - } - } - }, - "xAxis" : { - "type" : "category" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } + "subtitle" : { + "text" : "[Champions: 32] Last updated at 2023-05-24 16:59:49 GMT" }, "drilldown" : { "series" : [ { - "id" : "Aaron Smith", "name" : "Aaron Smith", "data" : [ [ @@ -204,9 +18,12 @@ "Blog", 1 ] - ] + ], + "id" : "Aaron Smith" }, { + "id" : "Abigail", + "name" : "Abigail", "data" : [ [ "Perl", @@ -216,12 +33,9 @@ "Blog", 2 ] - ], - "id" : "Abigail", - "name" : "Abigail" + ] }, { - "id" : "Adam Russell", "name" : "Adam Russell", "data" : [ [ @@ -232,11 +46,10 @@ "Blog", 1 ] - ] + ], + "id" : "Adam Russell" }, { - "name" : "Arne Sommer", - "id" : "Arne Sommer", "data" : [ [ "Raku", @@ -246,9 +59,13 @@ "Blog", 1 ] - ] + ], + "name" : "Arne Sommer", + "id" : "Arne Sommer" }, { + "id" : "Athanasius", + "name" : "Athanasius", "data" : [ [ "Perl", @@ -258,22 +75,19 @@ "Raku", 1 ] - ], - "name" : "Athanasius", - "id" : "Athanasius" + ] }, { + "id" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung", "data" : [ [ "Perl", 2 ] - ], - "id" : "Cheok-Yin Fung", - "name" : "Cheok-Yin Fung" + ] }, { - "id" : "Colin Crain", "name" : "Colin Crain", "data" : [ [ @@ -288,7 +102,8 @@ "Blog", 1 ] - ] + ], + "id" : "Colin Crain" }, { "data" : [ @@ -305,28 +120,26 @@ "id" : "Dave Jacoby" }, { + "name" : "Duncan C. White", "data" : [ [ "Perl", 2 ] ], - "name" : "Duncan C. White", "id" : "Duncan C. White" }, { - "name" : "E. Choroba", "id" : "E. Choroba", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "E. Choroba" }, { - "name" : "Flavio Poletti", - "id" : "Flavio Poletti", "data" : [ [ "Perl", @@ -336,7 +149,9 @@ "Blog", 2 ] - ] + ], + "name" : "Flavio Poletti", + "id" : "Flavio Poletti" }, { "data" : [ @@ -353,12 +168,11 @@ 1 ] ], - "id" : "Jaldhar H. Vyas", - "name" : "Jaldhar H. Vyas" + "name" : "Jaldhar H. Vyas", + "id" : "Jaldhar H. Vyas" }, { "id" : "James Smith", - "name" : "James Smith", "data" : [ [ "Perl", @@ -368,40 +182,40 @@ "Blog", 1 ] - ] + ], + "name" : "James Smith" }, { + "name" : "Jan Krnavek", "data" : [ [ "Raku", 2 ] ], - "id" : "Jan Krnavek", - "name" : "Jan Krnavek" + "id" : "Jan Krnavek" }, { - "name" : "Joan Mimosinnet", - "id" : "Joan Mimosinnet", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "Joan Mimosinnet", + "id" : "Joan Mimosinnet" }, { + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey", "data" : [ [ "Perl", 2 ] - ], - "id" : "Jorg Sommrey", - "name" : "Jorg Sommrey" + ] }, { - "id" : "Lance Wicks", "name" : "Lance Wicks", "data" : [ [ @@ -412,11 +226,10 @@ "Blog", 1 ] - ] + ], + "id" : "Lance Wicks" }, { - "name" : "Laurent Rosenfeld", - "id" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -430,11 +243,21 @@ "Blog", 1 ] - ] + ], + "name" : "Laurent Rosenfeld", + "id" : "Laurent Rosenfeld" + }, + { + "name" : "Lubos Kolouch", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Lubos Kolouch" }, { - "name" : "Luca Ferrari", - "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -444,7 +267,9 @@ "Blog", 2 ] - ] + ], + "name" : "Luca Ferrari", + "id" : "Luca Ferrari" }, { "data" : [ @@ -453,12 +278,11 @@ 2 ] ], - "id" : "Mark Anderson", - "name" : "Mark Anderson" + "name" : "Mark Anderson", + "id" : "Mark Anderson" }, { "name" : "Mohammad S Anwar", - "id" : "Mohammad S Anwar", "data" : [ [ "Perl", @@ -468,37 +292,28 @@ "Blog", 1 ] - ] + ], + "id" : "Mohammad S Anwar" }, { "name" : "Niels van Dijke", - "id" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ] - }, - { - "data" : [ - [ - "Raku", - 1 - ] ], - "id" : "PJ Durai", - "name" : "PJ Durai" + "id" : "Niels van Dijke" }, { - "name" : "Paulo Custodio", - "id" : "Paulo Custodio", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Paulo Custodio", + "id" : "Paulo Custodio" }, { "data" : [ @@ -510,6 +325,16 @@ "name" : "Pete Houston", "id" : "Pete Houston" }, + { + "id" : "PJ Durai", + "name" : "PJ Durai", + "data" : [ + [ + "Raku", + 1 + ] + ] + }, { "data" : [ [ @@ -525,12 +350,10 @@ 1 ] ], - "id" : "Roger Bell_West", - "name" : "Roger Bell_West" + "name" : "Roger Bell_West", + "id" : "Roger Bell_West" }, { - "id" : "Simon Green", - "name" : "Simon Green", "data" : [ [ "Perl", @@ -540,11 +363,11 @@ "Blog", 1 ] - ] + ], + "name" : "Simon Green", + "id" : "Simon Green" }, { - "id" : "Stuart Little", - "name" : "Stuart Little", "data" : [ [ "Perl", @@ -554,7 +377,9 @@ "Raku", 2 ] - ] + ], + "name" : "Stuart Little", + "id" : "Stuart Little" }, { "data" : [ @@ -571,6 +396,7 @@ "id" : "Ulrich Rieke" }, { + "id" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -581,25 +407,214 @@ 1 ] ], - "name" : "W. Luis Mochan", - "id" : "W. Luis Mochan" + "name" : "W. Luis Mochan" }, { + "id" : "Wanderdoc", + "name" : "Wanderdoc", "data" : [ [ "Perl", 2 ] - ], - "name" : "Wanderdoc", - "id" : "Wanderdoc" + ] } ] }, + "series" : [ + { + "name" : "The Weekly Challenge - 107", + "data" : [ + { + "drilldown" : "Aaron Smith", + "name" : "Aaron Smith", + "y" : 3 + }, + { + "drilldown" : "Abigail", + "name" : "Abigail", + "y" : 4 + }, + { + "drilldown" : "Adam Russell", + "name" : "Adam Russell", + "y" : 3 + }, + { + "y" : 3, + "name" : "Arne Sommer", + "drilldown" : "Arne Sommer" + }, + { + "drilldown" : "Athanasius", + "y" : 2, + "name" : "Athanasius" + }, + { + "drilldown" : "Cheok-Yin Fung", + "y" : 2, + "name" : "Cheok-Yin Fung" + }, + { + "y" : 5, + "name" : "Colin Crain", + "drilldown" : "Colin Crain" + }, + { + "drilldown" : "Dave Jacoby", + "y" : 3, + "name" : "Dave Jacoby" + }, + { + "name" : "Duncan C. White", + "y" : 2, + "drilldown" : "Duncan C. White" + }, + { + "y" : 2, + "name" : "E. Choroba", + "drilldown" : "E. Choroba" + }, + { + "drilldown" : "Flavio Poletti", + "name" : "Flavio Poletti", + "y" : 4 + }, + { + "drilldown" : "Jaldhar H. Vyas", + "y" : 5, + "name" : "Jaldhar H. Vyas" + }, + { + "y" : 3, + "name" : "James Smith", + "drilldown" : "James Smith" + }, + { + "drilldown" : "Jan Krnavek", + "y" : 2, + "name" : "Jan Krnavek" + }, + { + "drilldown" : "Joan Mimosinnet", + "y" : 2, + "name" : "Joan Mimosinnet" + }, + { + "y" : 2, + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey" + }, + { + "drilldown" : "Lance Wicks", + "y" : 2, + "name" : "Lance Wicks" + }, + { + "drilldown" : "Laurent Rosenfeld", + "y" : 5, + "name" : "Laurent Rosenfeld" + }, + { + "y" : 2, + "name" : "Lubos Kolouch", + "drilldown" : "Lubos Kolouch" + }, + { + "drilldown" : "Luca Ferrari", + "y" : 4, + "name" : "Luca Ferrari" + }, + { + "drilldown" : "Mark Anderson", + "y" : 2, + "name" : "Mark Anderson" + }, + { + "drilldown" : "Mohammad S Anwar", + "y" : 3, + "name" : "Mohammad S Anwar" + }, + { + "y" : 2, + "name" : "Niels van Dijke", + "drilldown" : "Niels van Dijke" + }, + { + "drilldown" : "Paulo Custodio", + "y" : 2, + "name" : "Paulo Custodio" + }, + { + "name" : "Pete Houston", + "y" : 2, + "drilldown" : "Pete Houston" + }, + { + "drilldown" : "PJ Durai", + "y" : 1, + "name" : "PJ Durai" + }, + { + "y" : 5, + "name" : "Roger Bell_West", + "drilldown" : "Roger Bell_West" + }, + { + "y" : 3, + "name" : "Simon Green", + "drilldown" : "Simon Green" + }, + { + "name" : "Stuart Little", + "y" : 4, + "drilldown" : "Stuart Little" + }, + { + "y" : 3, + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke" + }, + { + "name" : "W. Luis Mochan", + "y" : 3, + "drilldown" : "W. Luis Mochan" + }, + { + "name" : "Wanderdoc", + "y" : 2, + "drilldown" : "Wanderdoc" + } + ], + "colorByPoint" : 1 + } + ], + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, "chart" : { "type" : "column" }, - "subtitle" : { - "text" : "[Champions: 31] Last updated at 2021-06-12 20:35:17 GMT" + "tooltip" : { + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1, + "headerFormat" : "{series.name}
" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "legend" : { + "enabled" : 0 + }, + "xAxis" : { + "type" : "category" } } diff --git a/stats/pwc-current.json b/stats/pwc-current.json index d87c81413b..dcf55f3ccf 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,15 +1,4 @@ { - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "legend" : { - "enabled" : 0 - }, - "title" : { - "text" : "The Weekly Challenge - 218" - }, "plotOptions" : { "series" : { "borderWidth" : 0, @@ -20,92 +9,47 @@ } }, "subtitle" : { - "text" : "[Champions: 9] Last updated at 2023-05-23 18:54:03 GMT" + "text" : "[Champions: 10] Last updated at 2023-05-24 17:02:33 GMT" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } }, "chart" : { "type" : "column" }, - "xAxis" : { - "type" : "category" - }, "tooltip" : { - "pointFormat" : "{point.name}: {point.y:f}
", + "headerFormat" : "{series.name}
", "followPointer" : 1, - "headerFormat" : "{series.name}
" + "pointFormat" : "{point.name}: {point.y:f}
" + }, + "title" : { + "text" : "The Weekly Challenge - 218" + }, + "xAxis" : { + "type" : "category" }, - "series" : [ - { - "colorByPoint" : 1, - "data" : [ - { - "y" : 2, - "name" : "David Ferrone", - "drilldown" : "David Ferrone" - }, - { - "name" : "Lubos Kolouch", - "drilldown" : "Lubos Kolouch", - "y" : 2 - }, - { - "y" : 2, - "name" : "Mark Anderson", - "drilldown" : "Mark Anderson" - }, - { - "drilldown" : "Niels van Dijke", - "name" : "Niels van Dijke", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Robert DiCicco", - "name" : "Robert DiCicco" - }, - { - "drilldown" : "Stephen G. Lynn", - "name" : "Stephen G. Lynn", - "y" : 3 - }, - { - "drilldown" : "Steven Wilson", - "name" : "Steven Wilson", - "y" : 1 - }, - { - "y" : 4, - "drilldown" : "Thomas Kohler", - "name" : "Thomas Kohler" - }, - { - "name" : "W. Luis Mochan", - "drilldown" : "W. Luis Mochan", - "y" : 3 - } - ], - "name" : "The Weekly Challenge - 218" - } - ], "drilldown" : { "series" : [ { - "name" : "David Ferrone", "id" : "David Ferrone", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "David Ferrone" }, { + "name" : "Lubos Kolouch", "data" : [ [ "Perl", 2 ] ], - "name" : "Lubos Kolouch", "id" : "Lubos Kolouch" }, { @@ -120,16 +64,15 @@ }, { "name" : "Niels van Dijke", - "id" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Niels van Dijke" }, { - "id" : "Robert DiCicco", "name" : "Robert DiCicco", "data" : [ [ @@ -140,10 +83,10 @@ "Raku", 1 ] - ] + ], + "id" : "Robert DiCicco" }, { - "name" : "Stephen G. Lynn", "id" : "Stephen G. Lynn", "data" : [ [ @@ -154,19 +97,22 @@ "Blog", 1 ] - ] + ], + "name" : "Stephen G. Lynn" }, { - "name" : "Steven Wilson", "id" : "Steven Wilson", "data" : [ [ "Perl", 1 ] - ] + ], + "name" : "Steven Wilson" }, { + "name" : "Thomas Kohler", + "id" : "Thomas Kohler", "data" : [ [ "Perl", @@ -176,13 +122,23 @@ "Blog", 2 ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 1 + ] ], - "name" : "Thomas Kohler", - "id" : "Thomas Kohler" + "id" : "Ulrich Rieke", + "name" : "Ulrich Rieke" }, { - "id" : "W. Luis Mochan", - "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -192,8 +148,71 @@ "Blog", 1 ] - ] + ], + "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan" } ] - } + }, + "legend" : { + "enabled" : 0 + }, + "series" : [ + { + "data" : [ + { + "y" : 2, + "name" : "David Ferrone", + "drilldown" : "David Ferrone" + }, + { + "drilldown" : "Lubos Kolouch", + "name" : "Lubos Kolouch", + "y" : 2 + }, + { + "drilldown" : "Mark Anderson", + "name" : "Mark Anderson", + "y" : 2 + }, + { + "y" : 2, + "name" : "Niels van Dijke", + "drilldown" : "Niels van Dijke" + }, + { + "name" : "Robert DiCicco", + "y" : 2, + "drilldown" : "Robert DiCicco" + }, + { + "y" : 3, + "name" : "Stephen G. Lynn", + "drilldown" : "Stephen G. Lynn" + }, + { + "drilldown" : "Steven Wilson", + "name" : "Steven Wilson", + "y" : 1 + }, + { + "y" : 4, + "name" : "Thomas Kohler", + "drilldown" : "Thomas Kohler" + }, + { + "name" : "Ulrich Rieke", + "y" : 3, + "drilldown" : "Ulrich Rieke" + }, + { + "drilldown" : "W. Luis Mochan", + "y" : 3, + "name" : "W. Luis Mochan" + } +