aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-242/clifton-wood/raku/ch-1.raku10
-rw-r--r--challenge-242/clifton-wood/raku/ch-2.raku4
-rwxr-xr-xchallenge-242/eric-cheung/python/ch-1.py20
-rwxr-xr-xchallenge-242/eric-cheung/python/ch-2.py11
-rw-r--r--challenge-242/laurent-rosenfeld/blog.txt1
-rw-r--r--challenge-242/laurent-rosenfeld/perl/ch-1.pl21
-rw-r--r--challenge-242/laurent-rosenfeld/raku/ch-1.raku8
-rwxr-xr-xchallenge-242/perlboy1967/perl/ch-1.pl (renamed from challenge-242/perlboy1967/perl/ch1.pl)0
-rwxr-xr-xchallenge-242/perlboy1967/perl/ch-2.pl (renamed from challenge-242/perlboy1967/perl/ch2.pl)0
-rwxr-xr-xchallenge-242/ulrich-rieke/cpp/ch-1.cpp59
-rwxr-xr-xchallenge-242/ulrich-rieke/cpp/ch-2.cpp62
-rwxr-xr-xchallenge-242/ulrich-rieke/haskell/ch-1.hs21
-rwxr-xr-xchallenge-242/ulrich-rieke/haskell/ch-2.hs32
-rwxr-xr-xchallenge-242/ulrich-rieke/perl/ch-1.pl29
-rwxr-xr-xchallenge-242/ulrich-rieke/perl/ch-2.pl40
-rwxr-xr-xchallenge-242/ulrich-rieke/raku/ch-1.raku22
-rwxr-xr-xchallenge-242/ulrich-rieke/raku/ch-2.raku34
-rwxr-xr-xchallenge-242/ulrich-rieke/rust/ch-1.rs29
-rwxr-xr-xchallenge-242/ulrich-rieke/rust/ch-2.rs41
-rw-r--r--stats/pwc-challenge-241.json695
-rw-r--r--stats/pwc-current.json538
-rw-r--r--stats/pwc-language-breakdown-summary.json66
-rw-r--r--stats/pwc-language-breakdown.json3337
-rw-r--r--stats/pwc-leaders.json824
-rw-r--r--stats/pwc-summary-1-30.json98
-rw-r--r--stats/pwc-summary-121-150.json52
-rw-r--r--stats/pwc-summary-151-180.json56
-rw-r--r--stats/pwc-summary-181-210.json102
-rw-r--r--stats/pwc-summary-211-240.json120
-rw-r--r--stats/pwc-summary-241-270.json50
-rw-r--r--stats/pwc-summary-271-300.json118
-rw-r--r--stats/pwc-summary-31-60.json116
-rw-r--r--stats/pwc-summary-61-90.json56
-rw-r--r--stats/pwc-summary-91-120.json80
-rw-r--r--stats/pwc-summary.json708
35 files changed, 4139 insertions, 3321 deletions
diff --git a/challenge-242/clifton-wood/raku/ch-1.raku b/challenge-242/clifton-wood/raku/ch-1.raku
new file mode 100644
index 0000000000..de234fc88c
--- /dev/null
+++ b/challenge-242/clifton-wood/raku/ch-1.raku
@@ -0,0 +1,10 @@
+my %h;
+my @a = <a b c>;
+my @b = <b c f>; %h{ |@a, |@b } »=» 1;
+my (@m-a, @m-b);
+for %h.keys {
+ @m-a.push: $_ unless @a.first($_).defined;
+ @m-b.push: $_ unless @b.first($_).defined;
+}
+@m-a.gist.say;
+@m-b.gist.say;
diff --git a/challenge-242/clifton-wood/raku/ch-2.raku b/challenge-242/clifton-wood/raku/ch-2.raku
new file mode 100644
index 0000000000..1831ded48e
--- /dev/null
+++ b/challenge-242/clifton-wood/raku/ch-2.raku
@@ -0,0 +1,4 @@
+my @matrix = ([1, 1, 0], [1, 0, 1], [0, 0, 0]);
+@matrix.map( *.reverse.map( *.not.Int ) ).gist.say
+
+
diff --git a/challenge-242/eric-cheung/python/ch-1.py b/challenge-242/eric-cheung/python/ch-1.py
new file mode 100755
index 0000000000..b3d79cc846
--- /dev/null
+++ b/challenge-242/eric-cheung/python/ch-1.py
@@ -0,0 +1,20 @@
+
+## Example 1
+## arrNum_01 = [1, 2, 3]
+## arrNum_02 = [2, 4, 6]
+
+## Example 2
+arrNum_01 = [1, 2, 3, 3]
+arrNum_02 = [1, 1, 2, 2]
+
+arrOutput = []
+
+arrOutput_01 = [nLoop for nLoop in list(set(arrNum_01)) if nLoop not in list(set(arrNum_02))]
+if len(arrOutput_01) > 0:
+ arrOutput.append(arrOutput_01)
+
+arrOutput_02 = [nLoop for nLoop in list(set(arrNum_02)) if nLoop not in list(set(arrNum_01))]
+if len(arrOutput_02) > 0:
+ arrOutput.append(arrOutput_02)
+
+print (arrOutput)
diff --git a/challenge-242/eric-cheung/python/ch-2.py b/challenge-242/eric-cheung/python/ch-2.py
new file mode 100755
index 0000000000..9d487ad23a
--- /dev/null
+++ b/challenge-242/eric-cheung/python/ch-2.py
@@ -0,0 +1,11 @@
+
+arrMatrix = [[1, 1, 0], [0, 1, 1], [0, 0, 1]] ## Example 0
+## arrMatrix = [[1, 1, 0], [1, 0, 1], [0, 0, 0]] ## Example 1
+## arrMatrix = [[1, 1, 0, 0], [1, 0, 0, 1], [0, 1, 1, 1], [1, 0, 1, 0]] ## Example 2
+
+arrOutput = []
+
+for arrLoop in arrMatrix:
+ arrOutput.append([1 - nLoop for nLoop in arrLoop[::-1]])
+
+print (arrOutput)
diff --git a/challenge-242/laurent-rosenfeld/blog.txt b/challenge-242/laurent-rosenfeld/blog.txt
new file mode 100644
index 0000000000..1d58249df0
--- /dev/null
+++ b/challenge-242/laurent-rosenfeld/blog.txt
@@ -0,0 +1 @@
+https://blogs.perl.org/users/laurent_r/2023/11/perl-weekly-challenge-242-missing-members.html
diff --git a/challenge-242/laurent-rosenfeld/perl/ch-1.pl b/challenge-242/laurent-rosenfeld/perl/ch-1.pl
new file mode 100644
index 0000000000..7f07643be9
--- /dev/null
+++ b/challenge-242/laurent-rosenfeld/perl/ch-1.pl
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+use feature 'say';
+
+sub diff {
+ my ($aref, $bref) = @_;
+ my %a = map {$_ => 1} @$aref;
+ my %b = map {$_ => 1} @$bref;
+ my $adif = [grep { not exists $b{$_} } keys %a];
+ my $bdif = [grep { not exists $a{$_} } keys %b];
+ return "(@$adif) (@$bdif)";
+}
+
+my @tests = ( [[<1 2 3>], [<2 4 6>]],
+ [[<1 2 3 3>], [<1 1 2 2>]]
+ );
+for my $test (@tests) {
+ printf "%-10s - %-10s => ",
+ "@{$test->[0]}", "@{$test->[1]}";
+ say diff ($test->[0], $test->[1]);
+}
diff --git a/challenge-242/laurent-rosenfeld/raku/ch-1.raku b/challenge-242/laurent-rosenfeld/raku/ch-1.raku
new file mode 100644
index 0000000000..ac7891c025
--- /dev/null
+++ b/challenge-242/laurent-rosenfeld/raku/ch-1.raku
@@ -0,0 +1,8 @@
+sub diff (@a, @b) {
+ return map {.keys}, @a (-) @b, @b (-) @a;
+}
+
+for (<1 2 3>, < 2 4 6>), (<1 2 3 3>, <1 1 2 2>) -> @test {
+ printf "%-8s - %-8s => ", "@test[0]", "@test[1]";
+ say diff @test[0], @test[1];
+}
diff --git a/challenge-242/perlboy1967/perl/ch1.pl b/challenge-242/perlboy1967/perl/ch-1.pl
index 5954386f3e..5954386f3e 100755
--- a/challenge-242/perlboy1967/perl/ch1.pl
+++ b/challenge-242/perlboy1967/perl/ch-1.pl
diff --git a/challenge-242/perlboy1967/perl/ch2.pl b/challenge-242/perlboy1967/perl/ch-2.pl
index 3c4db8904a..3c4db8904a 100755
--- a/challenge-242/perlboy1967/perl/ch2.pl
+++ b/challenge-242/perlboy1967/perl/ch-2.pl
diff --git a/challenge-242/ulrich-rieke/cpp/ch-1.cpp b/challenge-242/ulrich-rieke/cpp/ch-1.cpp
new file mode 100755
index 0000000000..807d9becd9
--- /dev/null
+++ b/challenge-242/ulrich-rieke/cpp/ch-1.cpp
@@ -0,0 +1,59 @@
+#include <iostream>
+#include <vector>
+#include <algorithm>
+#include <string>
+#include <iterator>
+#include <set>
+
+std::vector<std::string> split( const std::string & startline ,
+ const std::string & sep ) {
+ std::vector<std::string> 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 some integers, separated by blanks!\n" ;
+ std::string line ;
+ std::getline( std::cin , line ) ;
+ std::vector<std::string> numberstrings { split( line , " " ) } ;
+ std::vector<int> firstNums , secondNums ;
+ for ( auto s : numberstrings )
+ firstNums.push_back( std::stoi( s )) ;
+ std::cout << "Enter some more integers, separated by blanks!\n" ;
+ std::getline( std::cin , line ) ;
+ numberstrings.clear( ) ;
+ numberstrings = split( line , " " ) ;
+ for ( auto s : numberstrings )
+ secondNums.push_back( std::stoi( s ) ) ;
+ std::set<int> firstDiff , secondDiff ;
+ std::set<int> firstSet( firstNums.begin( ) , firstNums.end( ) ) ;
+ std::set<int> secondSet( secondNums.begin( ) , secondNums.end( ) ) ;
+ std::set_difference( firstSet.begin( ) , firstSet.end( ) ,
+ secondSet.begin( ) , secondSet.end( ) , std::inserter( firstDiff ,
+ firstDiff.begin( ) ) ) ;
+ std::set_difference( secondSet.begin( ) , secondSet.end( ) ,
+ firstSet.begin( ) , firstSet.end( ) , std::inserter( secondDiff ,
+ secondDiff.begin( ) )) ;
+ std::cout << "(( " ;
+ if ( firstDiff.size( ) > 0 ) {
+ std::copy( firstDiff.begin( ) , firstDiff.end( ) ,
+ std::ostream_iterator<int>( std::cout , " " ) ) ;
+ }
+ if ( secondDiff.size( ) > 0 ) {
+ std::cout << ") , ( " ;
+ std::copy( secondDiff.begin( ) , secondDiff.end( ) ,
+ std::ostream_iterator<int>( std::cout , " " )) ;
+ std::cout << " ))\n" ;
+ }
+ else {
+ std::cout << "))\n" ;
+ }
+ return 0 ;
+}
diff --git a/challenge-242/ulrich-rieke/cpp/ch-2.cpp b/challenge-242/ulrich-rieke/cpp/ch-2.cpp
new file mode 100755
index 0000000000..d40538699d
--- /dev/null
+++ b/challenge-242/ulrich-rieke/cpp/ch-2.cpp
@@ -0,0 +1,62 @@
+#include <vector>
+#include <iostream>
+#include <algorithm>
+#include <string>
+
+std::vector<std::string> split( const std::string & startline ,
+ const std::string & sep ) {
+ std::vector<std::string> 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 myFlip( int num ) {
+ if (num == 0 )
+ return 1 ;
+ else
+ return 0 ;
+}
+
+int main( ) {
+ std::cout << "Enter some 0 or 1 , separated by blanks!\n" ;
+ std::string line ;
+ std::getline( std::cin , line ) ;
+ std::vector<std::vector<int>> matrix ;
+ std::vector<std::string> numberstrings( split( line , " " ) ) ;
+ int len = numberstrings.size( ) ;
+ std::vector<int> numbers ;
+ for ( auto s : numberstrings )
+ numbers.push_back( std::stoi( s ) ) ;
+ matrix.push_back( numbers ) ;
+ for ( int i = 0 ; i < len - 1 ; i++ ) {
+ std::cout << "Please enter " << len << " numbers of 0 or 1 , "
+ << "separated by blanks!\n" ;
+ std::getline( std::cin , line ) ;
+ numberstrings = split( line , " " ) ;
+ numbers.clear( ) ;
+ for ( auto s : numberstrings )
+ numbers.push_back( std::stoi( s ) ) ;
+ matrix.push_back( numbers ) ;
+ }
+ std::transform( matrix.begin( ) , matrix.end( ) , matrix.begin( ) ,
+ []( auto & vec ) { std::reverse( vec.begin( ) , vec.end( ) ) ;
+ return vec ; } ) ;
+ std::transform( matrix.begin( ) , matrix.end( ) , matrix.begin( ) ,
+ []( auto & vec ) { std::transform( vec.begin( ) , vec.end( ) ,
+ vec.begin( ) , myFlip ) ; return vec ; } ) ;
+ std::cout << "(" ;
+ for ( auto & vec : matrix ) {
+ std::cout << "( " ;
+ for ( int i : vec )
+ std::cout << i << " " ;
+ std::cout << ")" ;
+ }
+ std::cout << ")\n" ;
+ return 0 ;
+}
diff --git a/challenge-242/ulrich-rieke/haskell/ch-1.hs b/challenge-242/ulrich-rieke/haskell/ch-1.hs
new file mode 100755
index 0000000000..a70738a3a7
--- /dev/null
+++ b/challenge-242/ulrich-rieke/haskell/ch-1.hs
@@ -0,0 +1,21 @@
+module Challenge242
+ where
+import qualified Data.Set as S
+
+solution :: [Int] -> [Int] -> ([Int] , [Int] )
+solution firstNums secondNums = ( S.toList firstDiffSet ,
+ S.toList secondDiffSet )
+ where
+ firstDiffSet = (S.fromList firstNums) S.\\ ( S.fromList secondNums )
+ secondDiffSet = (S.fromList secondNums ) S.\\ (S.fromList firstNums )
+
+main :: IO ( )
+main = do
+ putStrLn "Enter some integers, separated by blanks!"
+ firstNums <- getLine
+ putStrLn "Enter some more integers, separated by blanks!"
+ secondNums <- getLine
+ let firstNumbers = map read $ words firstNums
+ secondNumbers = map read $ words secondNums
+ thePair = solution firstNumbers secondNumbers
+ print thePair
diff --git a/challenge-242/ulrich-rieke/haskell/ch-2.hs b/challenge-242/ulrich-rieke/haskell/ch-2.hs
new file mode 100755
index 0000000000..4b60c26a21
--- /dev/null
+++ b/challenge-242/ulrich-rieke/haskell/ch-2.hs
@@ -0,0 +1,32 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+module Challenge242_2
+ where
+
+enterNlines :: Int -> Int -> IO [String]
+enterNlines n original
+ |n <= 0 = return []
+ |otherwise = do
+ putStr ("Enter " ++ show n ++ " lines of " ++
+ show original ++ " numbers")
+ putStrLn " 0 and 1"
+ numberstrings <- getLine
+ xs <- enterNlines ( n - 1 ) original
+ let ret = (numberstrings : xs)
+ return ret
+
+myFlip :: Int -> Int
+myFlip n = if n == 1 then 0 else 1
+
+convert :: [[Int]] -> [[Int]]
+convert = map ( map myFlip . reverse )
+
+main :: IO ( )
+main = do
+ putStrLn "Enter some 0 and 1 , separated by blanks!" ;
+ numberstrings <- getLine
+ let ct = length $ words numberstrings
+ (numbers :: [Int] ) = map read $ words numberstrings
+ additionalNumbers <- enterNlines ( ct - 1 ) ct
+ let allNums = numberstrings : additionalNumbers
+ allNumbers = map ( map read . words ) allNums
+ print $ convert allNumbers
diff --git a/challenge-242/ulrich-rieke/perl/ch-1.pl b/challenge-242/ulrich-rieke/perl/ch-1.pl
new file mode 100755
index 0000000000..4cb75399bd
--- /dev/null
+++ b/challenge-242/ulrich-rieke/perl/ch-1.pl
@@ -0,0 +1,29 @@
+#!/usr/bin/perl ;
+use strict ;
+use warnings ;
+use feature 'say' ;
+
+say "Enter some integers, separated by blanks!" ;
+my $line = <STDIN> ;
+chomp $line ;
+my @firstNumbers = split( /\s/ , $line ) ;
+say "Enter some more integers, separated by blanks!" ;
+$line = <STDIN> ;
+chomp $line ;
+my @secondNumbers = split( /\s/ , $line ) ;
+my %firstHash ;
+my %secondHash ;
+map { $firstHash{$_}++ } @firstNumbers ;
+map { $secondHash{$_}++ } @secondNumbers ;
+my @firstDiff = grep { not ( exists ( $secondHash{$_} ) ) } keys %firstHash ;
+my @secondDiff = grep { not ( exists ( $firstHash{$_} ) ) } keys %secondHash ;
+print "((" ;
+if ( @firstDiff ) {
+ print join( ',' , @firstDiff ) ;
+}
+if ( @secondDiff ) {
+ say ") , (" . join( ',' , @secondDiff ) . "))" ;
+}
+else {
+ say "))" ;
+}
diff --git a/challenge-242/ulrich-rieke/perl/ch-2.pl b/challenge-242/ulrich-rieke/perl/ch-2.pl
new file mode 100755
index 0000000000..af2da757dc
--- /dev/null
+++ b/challenge-242/ulrich-rieke/perl/ch-2.pl
@@ -0,0 +1,40 @@
+#!/usr/bin/perl ;
+use strict ;
+use warnings ;
+use feature 'say' ;
+
+sub myFlip {
+ my $number = shift ;
+ if ( $number == 0 ) {
+ return 1 ;
+ }
+ else {
+ return 0 ;
+ }
+}
+
+say "Enter some 0 or 1 , separated by blanks!" ;
+my $line = <STDIN> ;
+chomp $line ;
+my @numbers = split( /\s/ , $line ) ;
+my $len = scalar( @numbers ) ;
+my $counter = 0 ;
+my @result ;
+while ( $counter < $len - 1 ) {
+ my @reversed = reverse ( split( /\s/ , $line ) ) ;
+ my @flipped = map {myFlip( $_ )} @reversed ;
+ push @result , join( ',' , @flipped ) ;
+ say "Enter $len numbers 0 or 1 , separated by blanks!" ;
+ $line = <STDIN> ;
+ chomp $line ;
+ $counter++ ;
+}
+my @reversed = reverse ( split( /\s/ , $line ) ) ;
+my @flipped = map {myFlip( $_ )} @reversed ;
+push @result , join( ',' , @flipped ) ;
+print "(" ;
+for my $r( @result ) {
+ print "(" . $r . ")" . " " ;
+}
+say ")"
+
diff --git a/challenge-242/ulrich-rieke/raku/ch-1.raku b/challenge-242/ulrich-rieke/raku/ch-1.raku
new file mode 100755
index 0000000000..64e7f2bf2f
--- /dev/null
+++ b/challenge-242/ulrich-rieke/raku/ch-1.raku
@@ -0,0 +1,22 @@
+use v6 ;
+
+say "Enter some integers , separated by blanks!" ;
+my $line = $*IN.get ;
+my @firstNumbers = $line.words.map( {.Int} ) ;
+say "Enter some more integers, separated by blanks!" ;
+$line = $*IN.get ;
+my @secondNumbers = $line.words.map( {.Int} ) ;
+my $firstSet = @firstNumbers.Set ;
+my $secondSet = @secondNumbers.Set ;
+my $firstDiff = $firstSet (-) $secondSet ;
+my $secondDiff = $secondSet (-) $firstSet ;
+print "((" ;
+if ( $firstDiff ) {
+ print $firstDiff.keys.sort ;
+}
+if ( $secondDiff ) {
+ say ") , (" ~ $secondDiff.keys.sort ~ "))" ;
+}
+else {
+ say "))" ;
+}
diff --git a/challenge-242/ulrich-rieke/raku/ch-2.raku b/challenge-242/ulrich-rieke/raku/ch-2.raku
new file mode 100755
index 0000000000..893c882b79
--- /dev/null
+++ b/challenge-242/ulrich-rieke/raku/ch-2.raku
@@ -0,0 +1,34 @@
+use v6 ;
+
+sub myFlip( $number is copy ) {
+ if ( $number == 0 ) {
+ return 1 ;
+ }
+ else {
+ return 0 ;
+ }
+}
+
+say "Enter some 0 or 1, separated by blanks!" ;
+my $line = $*IN.get ;
+my @numbers = $line.words ;
+my $len = @numbers.elems ;
+my $counter = 0 ;
+my @matrix ;
+while ( $counter != $len - 1 ) {
+ @matrix.push( $line ) ;
+ say "Enter $len elements of 0 or 1 , separated by blanks!" ;
+ $line = $*IN.get ;
+ $counter++ ;
+}
+@matrix.push( $line ) ;
+my @result ;
+for @matrix -> $l {
+ my $changed = $l.words.reverse.map( {myFlip( $_.Int)} ).join( ',' ) ;
+ @result.push( $changed ) ;
+}
+print "(" ;
+for @result -> $r {
+ print "(" ~ $r ~ ")" ~ " ";
+}
+say ")" ;
diff --git a/challenge-242/ulrich-rieke/rust/ch-1.rs b/challenge-242/ulrich-rieke/rust/ch-1.rs
new file mode 100755
index 0000000000..3dc5874b32
--- /dev/null
+++ b/challenge-242/ulrich-rieke/rust/ch-1.rs
@@ -0,0 +1,29 @@
+use std::io ;
+use std::collections::HashSet ;
+fn main() {
+ println!("Enter some integers, separated by blanks!");
+ let mut first_line : String = String::new( ) ;
+ io::stdin( ).read_line( &mut first_line ).unwrap( ) ;
+ let a_line : &str = &*first_line ;
+ let first_nums : Vec<i32> = a_line.split_whitespace( ).map( | s |
+ s.trim( ).parse::<i32>( ).unwrap( ) ).collect( ) ;
+ println!("Enter some more integers, separated by blanks!") ;
+ let mut second_line : String = String::new( ) ;
+ io::stdin( ).read_line( &mut second_line ).unwrap( ) ;
+ let b_line : &str = &*second_line ;
+ let second_nums : Vec<i32> = b_line.split_whitespace( ).map( | s |
+ s.trim( ).parse::<i32>( ).unwrap( ) ).collect( ) ;
+ let mut first_set : HashSet<i32> = HashSet::new( ) ;
+ let mut second_set : HashSet<i32> = HashSet::new( ) ;
+ for i in first_nums {
+ first_set.insert( i ) ;
+ }
+ for i in second_nums {
+ second_set.insert( i ) ;
+ }
+ let first_diff : HashSet<_> = second_set.difference( &first_set )
+ .collect( ) ;
+ let second_diff : HashSet<_> = first_set.difference( &second_set )
+ .collect( ) ;
+ println!("({:?} , {:?})" , second_diff , first_diff ) ;
+}
diff --git a/challenge-242/ulrich-rieke/rust/ch-2.rs b/challenge-242/ulrich-rieke/rust/ch-2.rs
new file mode 100755
index 0000000000..bc3d1f38b0
--- /dev/null
+++ b/challenge-242/ulrich-rieke/rust/ch-2.rs
@@ -0,0 +1,41 @@
+use std::io ;
+
+fn main() {
+ println!("Enter some 0 or 1 , separated by blanks!");
+ println!("Enter as many rows as there are numbers in the first row!") ;
+ let mut matrix : Vec<Vec<u8>> = Vec::new( ) ;
+ let mut inline : String = String::new( ) ;
+ io::stdin( ).read_line( &mut inline ).unwrap( ) ;
+ let entered_line : &str = &*inline ;
+ let first_nums : Vec<u8> = entered_line.split_whitespace( ).map( | s |
+ s.trim( ).parse::<u8>( ).unwrap( )).collect( ) ;
+ let len = first_nums.len( ) ;
+ matrix.push( first_nums ) ;
+ let mut counter : usize = 0 ;
+ while counter != len - 1 {
+ println!("Enter some more 0 and 1 , separated by blanks!") ;
+ let mut next_line : String = String::new( ) ;
+ io::stdin( ).read_line( &mut next_line ).unwrap( ) ;
+ let num_line : &str = &*next_line ;
+ let nums : Vec<u8> = num_line.split_whitespace( ).map( | s |
+ s.trim( ).parse::<u8>( ).unwrap( ) ).collect( ) ;
+ matrix.push( nums ) ;
+ counter += 1 ;
+ }
+ let mut new_matrix : Vec<Vec<u8>> = Vec::new( ) ;
+ for v in &mut matrix {
+ let sl = v.as_mut_slice( ) ;
+ sl.reverse( ) ;
+ let mut changed = sl.to_vec( ) ;
+ for i in 0..len {
+ if changed[ i ] == 0 {
+ changed[ i ] = 1 ;
+ }
+ else {
+ changed[ i ] = 0 ;
+ }
+ }
+ new_matrix.push( changed ) ;
+ }
+ println!("{:?}" , new_matrix ) ;
+}
diff --git a/stats/pwc-challenge-241.json b/stats/pwc-challenge-241.json
new file mode 100644
index 0000000000..fc62085316
--- /dev/null
+++ b/stats/pwc-challenge-241.json
@@ -0,0 +1,695 @@
+{
+ "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/>"
+ },
+ "subtitle" : {
+ "text" : "[Champions: 37] Last updated at 2023-11-07 14:55:34 GMT"
+ },
+ "drilldown" : {
+ "series" : [
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 2
+ ]
+ ],
+ "id" : "Adam Russell",
+ "name" : "Adam Russell"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Ali Moradi",
+ "name" : "Ali Moradi"
+ },
+ {
+ "data" : [
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "name" : "Arne Sommer",
+ "id" : "Arne Sommer"
+ },
+ {
+ "name" : "Athanasius",
+ "id" : "Athanasius",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ]
+ ]
+ },
+ {
+ "id" : "Bob Lied",
+ "name" : "Bob Lied",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ]
+ },
+ {
+ "id" : "Bruce Gray",
+ "name" : "Bruce Gray",
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ]
+ },
+ {
+ "name" : "Cheok-Yin Fung",
+ "id" : "Cheok-Yin Fung",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ]
+ },
+ {
+ "id" : "Dave Jacoby",
+ "name" : "Dave Jacoby",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "name" : "David Ferrone",
+ "id" : "David Ferrone"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "name" : "E. Choroba",
+ "id" : "E. Choroba"
+ },
+ {
+ "id" : "Ian Rifkin",
+ "name" : "Ian Rifkin",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ]
+ },
+ {
+ "name" : "Jaldhar H. Vyas",
+ "id" : "Jaldhar H. Vyas",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ]
+ },
+ {
+ "id" : "Jan Krnavek",
+ "name" : "Jan Krnavek",
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "id" : "Jorg Sommrey",
+ "name" : "Jorg Sommrey"
+ },
+ {
+ "name" : "Kjetil Skotheim",
+ "id" : "Kjetil Skotheim",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ]
+ },
+ {
+ "id" : "lacek96",
+ "name" : "lacek96",
+ "data" : [
+ [
+ "Perl",
+ 1
+ ]
+ ]
+ },
+ {
+ "name" : "librasteve",
+ "id" : "librasteve",
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Lubos Kolouch",
+ "name" : "Lubos Kolouch"
+ },
+ {
+ "name" : "Luca Ferrari",
+ "id" : "Luca Ferrari",
+ "data" : [
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 8
+ ]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ],
+ "id" : "Mark Anderson",
+ "name" : "Mark Anderson"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+