aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <mohammad.anwar@yahoo.com>2024-03-12 12:11:21 +0000
committerMohammad S Anwar <mohammad.anwar@yahoo.com>2024-03-12 12:11:21 +0000
commit3b5b7c7d593b5882c64cecd5d00ae9fe736faaf4 (patch)
treec650aef9dc24b03804fc8db6887e69fe1e26736f
parentd62a01b918fdafcc375bab2ac6096b7ceef49718 (diff)
downloadperlweeklychallenge-club-3b5b7c7d593b5882c64cecd5d00ae9fe736faaf4.tar.gz
perlweeklychallenge-club-3b5b7c7d593b5882c64cecd5d00ae9fe736faaf4.tar.bz2
perlweeklychallenge-club-3b5b7c7d593b5882c64cecd5d00ae9fe736faaf4.zip
- Added solutions by Ulrich Rieke.
- Added solutions by David Ferrone. - Added solutions by PokGoPun. - Added solutions by Roger Bell_West. - Added solutions by Luca Ferrari.
-rwxr-xr-xchallenge-260/ulrich-rieke/cpp/ch-2.cpp23
-rw-r--r--stats/pwc-current.json217
-rw-r--r--stats/pwc-language-breakdown-summary.json68
-rw-r--r--stats/pwc-language-breakdown.json1746
-rw-r--r--stats/pwc-leaders.json402
-rw-r--r--stats/pwc-summary-1-30.json40
-rw-r--r--stats/pwc-summary-121-150.json38
-rw-r--r--stats/pwc-summary-151-180.json124
-rw-r--r--stats/pwc-summary-181-210.json32
-rw-r--r--stats/pwc-summary-211-240.json106
-rw-r--r--stats/pwc-summary-241-270.json122
-rw-r--r--stats/pwc-summary-271-300.json114
-rw-r--r--stats/pwc-summary-301-330.json56
-rw-r--r--stats/pwc-summary-31-60.json122
-rw-r--r--stats/pwc-summary-61-90.json96
-rw-r--r--stats/pwc-summary-91-120.json110
-rw-r--r--stats/pwc-summary.json56
17 files changed, 1774 insertions, 1698 deletions
diff --git a/challenge-260/ulrich-rieke/cpp/ch-2.cpp b/challenge-260/ulrich-rieke/cpp/ch-2.cpp
new file mode 100755
index 0000000000..c04b8ffb58
--- /dev/null
+++ b/challenge-260/ulrich-rieke/cpp/ch-2.cpp
@@ -0,0 +1,23 @@
+#include <iostream>
+#include <algorithm>
+#include <string>
+#include <iterator>
+#include <vector>
+
+int main( ) {
+ std::cout << "Enter a word, preferably in capital letters only!\n" ;
+ std::string word ;
+ std::getline( std::cin , word ) ;
+ std::string entered { word } ;
+ std::vector<std::string> permus ;
+ std::sort( word.begin( ) , word.end( ) ) ;
+ do {
+ permus.push_back( word ) ;
+ } while ( std::next_permutation( word.begin( ) , word.end( ) )) ;
+ std::sort( permus.begin( ) , permus.end( ) ) ;
+ auto found = std::find( permus.begin( ) , permus.end( ) , entered ) ;
+ std::cout << (static_cast<int>(std::distance( permus.begin( ) , found)))
+ + 1 ;
+ std::cout << '\n' ;
+ return 0 ;
+}
diff --git a/stats/pwc-current.json b/stats/pwc-current.json
index a5ac704057..74e3d67374 100644
--- a/stats/pwc-current.json
+++ b/stats/pwc-current.json
@@ -1,15 +1,85 @@
{
- "chart" : {
- "type" : "column"
+ "legend" : {
+ "enabled" : 0
},
- "title" : {
- "text" : "The Weekly Challenge - 260"
+ "subtitle" : {
+ "text" : "[Champions: 10] Last updated at 2024-03-12 11:48:38 GMT"
+ },
+ "tooltip" : {
+ "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>",
+ "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>",
+ "followPointer" : 1
},
+ "plotOptions" : {
+ "series" : {
+ "borderWidth" : 0,
+ "dataLabels" : {
+ "format" : "{point.y}",
+ "enabled" : 1
+ }
+ }
+ },
+ "series" : [
+ {
+ "data" : [
+ {
+ "y" : 3,
+ "drilldown" : "Dave Jacoby",
+ "name" : "Dave Jacoby"
+ },
+ {
+ "name" : "David Ferrone",
+ "drilldown" : "David Ferrone",
+ "y" : 2
+ },
+ {
+ "y" : 2,
+ "drilldown" : "E. Choroba",
+ "name" : "E. Choroba"
+ },
+ {
+ "drilldown" : "Luca Ferrari",
+ "name" : "Luca Ferrari",
+ "y" : 11
+ },
+ {
+ "name" : "Mark Anderson",
+ "drilldown" : "Mark Anderson",
+ "y" : 2
+ },
+ {
+ "y" : 2,
+ "name" : "Peter Meszaros",
+ "drilldown" : "Peter Meszaros"
+ },
+ {
+ "y" : 4,
+ "drilldown" : "Roger Bell_West",
+ "name" : "Roger Bell_West"
+ },
+ {
+ "name" : "Thomas Kohler",
+ "drilldown" : "Thomas Kohler",
+ "y" : 4
+ },
+ {
+ "name" : "Ulrich Rieke",
+ "drilldown" : "Ulrich Rieke",
+ "y" : 4
+ },
+ {
+ "drilldown" : "W. Luis Mochan",
+ "name" : "W. Luis Mochan",
+ "y" : 3
+ }
+ ],
+ "colorByPoint" : 1,
+ "name" : "The Weekly Challenge - 260"
+ }
+ ],
"drilldown" : {
"series" : [
{
- "name" : "Dave Jacoby",
- "id" : "Dave Jacoby",
"data" : [
[
"Perl",
@@ -19,40 +89,79 @@
"Blog",
1
]
- ]
+ ],
+ "name" : "Dave Jacoby",
+ "id" : "Dave Jacoby"
},
{
+ "id" : "David Ferrone",
"data" : [
[
"Perl",
2
]
],
+ "name" : "David Ferrone"
+ },
+ {
"id" : "E. Choroba",
- "name" : "E. Choroba"
+ "name" : "E. Choroba",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ]
+ },
+ {
+ "id" : "Luca Ferrari",
+ "data" : [
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 9
+ ]
+ ],
+ "name" : "Luca Ferrari"
},
{
- "name" : "Mark Anderson",
"id" : "Mark Anderson",
"data" : [
[
"Raku",
2
]
- ]
+ ],
+ "name" : "Mark Anderson"
},
{
- "id" : "Peter Meszaros",
+ "name" : "Peter Meszaros",
"data" : [
[
"Perl",
2
]
],
- "name" : "Peter Meszaros"
+ "id" : "Peter Meszaros"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ]
+ ],
+ "name" : "Roger Bell_West",
+ "id" : "Roger Bell_West"
},
{
- "name" : "Thomas Kohler",
"data" : [
[
"Perl",
@@ -63,9 +172,12 @@
2
]
],
+ "name" : "Thomas Kohler",
"id" : "Thomas Kohler"
},
{
+ "id" : "Ulrich Rieke",
+ "name" : "Ulrich Rieke",
"data" : [
[
"Perl",
@@ -75,12 +187,9 @@
"Raku",
2
]
- ],
- "id" : "Ulrich Rieke",
- "name" : "Ulrich Rieke"
+ ]
},
{
- "id" : "W. Luis Mochan",
"data" : [
[
"Perl",
@@ -91,79 +200,23 @@
1
]
],
- "name" : "W. Luis Mochan"
+ "name" : "W. Luis Mochan",
+ "id" : "W. Luis Mochan"
}
]
},
- "plotOptions" : {
- "series" : {
- "dataLabels" : {
- "format" : "{point.y}",
- "enabled" : 1
- },
- "borderWidth" : 0
- }
- },
- "series" : [
- {
- "colorByPoint" : 1,
- "data" : [
- {
- "drilldown" : "Dave Jacoby",
- "name" : "Dave Jacoby",
- "y" : 3
- },
- {
- "name" : "E. Choroba",
- "y" : 2,
- "drilldown" : "E. Choroba"
- },
- {
- "name" : "Mark Anderson",
- "y" : 2,
- "drilldown" : "Mark Anderson"
- },
- {
- "drilldown" : "Peter Meszaros",
- "y" : 2,
- "name" : "Peter Meszaros"
- },
- {
- "name" : "Thomas Kohler",
- "y" : 4,
- "drilldown" : "Thomas Kohler"
- },
- {
- "drilldown" : "Ulrich Rieke",
- "y" : 4,
- "name" : "Ulrich Rieke"
- },
- {
- "drilldown" : "W. Luis Mochan",
- "name" : "W. Luis Mochan",
- "y" : 3
- }
- ],
- "name" : "The Weekly Challenge - 260"
- }
- ],
- "legend" : {
- "enabled" : 0
- },
- "subtitle" : {
- "text" : "[Champions: 7] Last updated at 2024-03-11 19:13:07 GMT"
- },
- "xAxis" : {
- "type" : "category"
+ "chart" : {
+ "type" : "column"
},
- "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/>"
+ "title" : {
+ "text" : "The Weekly Challenge - 260"
},
"yAxis" : {
"title" : {
"text" : "Total Solutions"
}
+ },
+ "xAxis" : {
+ "type" : "category"
}
}
diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json
index 2eab62b0c1..ad46a24e9e 100644
--- a/stats/pwc-language-breakdown-summary.json
+++ b/stats/pwc-language-breakdown-summary.json
@@ -1,4 +1,19 @@
{
+ "yAxis" : {
+ "min" : 0,
+ "title" : {
+ "text" : null
+ }
+ },
+ "xAxis" : {
+ "labels" : {
+ "style" : {
+ "fontFamily" : "Verdana, sans-serif",
+ "fontSize" : "13px"
+ }
+ },
+ "type" : "category"
+ },
"title" : {
"text" : "The Weekly Challenge Contributions [2019 - 2024]"
},
@@ -8,56 +23,41 @@
"series" : [
{
"name" : "Contributions",
- "dataLabels" : {
- "align" : "right",
- "color" : "#FFFFFF",
- "enabled" : "true",
- "y" : 10,
- "format" : "{point.y:.0f}",
- "style" : {
- "fontFamily" : "Verdana, sans-serif",
- "fontSize" : "13px"
- },
- "rotation" : -90
- },
"data" : [
[
"Blog",
- 4615
+ 4624
],
[
"Perl",
- 13400
+ 13404
],
[
"Raku",
- 7784
+ 7788
]
- ]
+ ],
+ "dataLabels" : {
+ "align" : "right",
+ "enabled" : "true",
+ "y" : 10,
+ "rotation" : -90,
+ "color" : "#FFFFFF",
+ "format" : "{point.y:.0f}",
+ "style" : {
+ "fontSize" : "13px",
+ "fontFamily" : "Verdana, sans-serif"
+ }
+ }
}
],
- "legend" : {
- "enabled" : "false"
- },
"subtitle" : {
- "text" : "Last updated at 2024-03-11 19:13:07 GMT"
- },
- "xAxis" : {
- "type" : "category",
- "labels" : {
- "style" : {
- "fontSize" : "13px",
- "fontFamily" : "Verdana, sans-serif"
- }
- }
+ "text" : "Last updated at 2024-03-12 11:48:38 GMT"
},
"tooltip" : {
"pointFormat" : "<b>{point.y:.0f}</b>"
},
- "yAxis" : {
- "title" : {
- "text" : null
- },
- "min" : 0
+ "legend" : {
+ "enabled" : "false"
}
}
diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json
index 4883b807d5..c2543c9b7d 100644
--- a/stats/pwc-language-breakdown.json
+++ b/stats/pwc-language-breakdown.json
@@ -1,8 +1,22 @@
{
+ "xAxis" : {
+ "type" : "category"
+ },
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
+ },
+ "chart" : {
+ "type" : "column"
+ },
+ "title" : {
+ "text" : "The Weekly Challenge Language"
+ },
"drilldown" : {
"series" : [
{
- "id" : "001",
+ "name" : "001",
"data" : [
[
"Perl",
@@ -17,11 +31,11 @@
12
]
],
- "name" : "001"
+ "id" : "001"
},
{
- "name" : "002",
"id" : "002",
+ "name" : "002",
"data" : [
[
"Perl",
@@ -52,10 +66,11 @@
9
]
],
- "id" : "003",
- "name" : "003"
+ "name" : "003",
+ "id" : "003"
},
{
+ "id" : "004",
"name" : "004",
"data" : [
[
@@ -70,8 +85,7 @@
"Blog",
10
]
- ],
- "id" : "004"
+ ]
},
{
"name" : "005",
@@ -106,10 +120,11 @@
7
]
],
- "id" : "006",
- "name" : "006"
+ "name" : "006",
+ "id" : "006"
},
{
+ "id" : "007",
"data" : [
[
"Perl",
@@ -124,12 +139,9 @@
10
]
],
- "id" : "007",
"name" : "007"
},
{
- "name" : "008",
- "id" : "008",
"data" : [
[
"Perl",
@@ -143,9 +155,12 @@
"Blog",
12
]
- ]
+ ],
+ "name" : "008",
+ "id" : "008"
},
{
+ "id" : "009",
"name" : "009",
"data" : [
[
@@ -160,10 +175,11 @@
"Blog",
13
]
- ],
- "id" : "009"
+ ]
},
{
+ "id" : "010",
+ "name" : "010",
"data" : [
[
"Perl",
@@ -177,9 +193,7 @@
"Blog",
11
]
- ],
- "id" : "010",
- "name" : "010"
+ ]
},
{
"data" : [
@@ -196,10 +210,11 @@
10
]
],
- "id" : "011",
- "name" : "011"
+ "name" : "011",
+ "id" : "011"
},
{
+ "id" : "012",
"data" : [
[
"Perl",
@@ -214,11 +229,11 @@
11
]
],
- "id" : "012",
"name" : "012"
},
{
"id" : "013",
+ "name" : "013",
"data" : [
[
"Perl",
@@ -232,11 +247,9 @@
"Blog",
13
]
- ],
- "name" : "013"
+ ]
},
{
- "id" : "014",
"data" : [
[
"Perl",
@@ -251,10 +264,10 @@
15
]
],
- "name" : "014"
+ "name" : "014",
+ "id" : "014"
},
{
- "id" : "015",
"data" : [
[
"Perl",
@@ -269,9 +282,12 @@
15
]
],
- "name" : "015"
+ "name" : "015",
+ "id" : "015"
},
{
+ "id" : "016",
+ "name" : "016",
"data" : [
[
"Perl",
@@ -285,9 +301,7 @@
"Blog",
13
]
- ],
- "id" : "016",
- "name" : "016"
+ ]
},
{
"name" : "017",
@@ -308,7 +322,6 @@
"id" : "017"
},
{
- "name" : "018",
"data" : [
[
"Perl",
@@ -323,10 +336,11 @@
14
]
],
+ "name" : "018",
"id" : "018"
},
{
- "name" : "019",
+ "id" : "019",
"data" : [
[
"Perl",
@@ -341,10 +355,9 @@
13
]
],
- "id" : "019"
+ "name" : "019"
},
{
- "id" : "020",
"data" : [
[
"Perl",
@@ -359,7 +372,8 @@
13
]
],
- "name" : "020"
+ "name" : "020",
+ "id" : "020"
},
{
"id" : "021",
@@ -380,6 +394,7 @@
"name" : "021"
},
{
+ "name" : "022",
"data" : [
[
"Perl",
@@ -394,8 +409,7 @@
10
]
],
- "id" : "022",
- "name" : "022"
+ "id" : "022"
},
{
"id" : "023",
@@ -416,6 +430,7 @@
"name" : "023"
},
{
+ "id" : "024",
"data" : [
[
"Perl",
@@ -430,11 +445,10 @@
11
]
],
- "id" : "024",
"name" : "024"
},
{
- "name" : "025",
+ "id" : "025",
"data" : [
[
"Perl",
@@ -449,7 +463,7 @@
12
]
],
- "id" : "025"
+ "name" : "025"
},
{
"name" : "026",
@@ -470,8 +484,6 @@
"id" : "026"
},
{
- "name" : "027",
- "id" : "027",
"data" : [
[
"Perl",
@@ -485,10 +497,12 @@
"Blog",
9
]
- ]
+ ],
+ "name" : "027",
+ "id" : "027"
},
{
- "name" : "028",
+ "id" : "028",
"data" : [
[
"Perl",
@@ -503,11 +517,9 @@
9
]
],
- "id" : "028"
+ "name" : "028"
},
{
- "name" : "029",
- "id" : "029",
"data" : [
[
"Perl",
@@ -521,10 +533,12 @@
"Blog",
12
]
- ]
+ ],
+ "name" : "029",
+ "id" : "029"
},
{
- "id" : "030",
+ "name" : "030",
"data" : [
[
"Perl",
@@ -539,11 +553,9 @@
10
]
],
- "name" : "030"
+ "id" : "030"
},
{
- "name" : "031",
- "id" : "031",
"data" : [
[
"Perl",
@@ -557,10 +569,13 @@
"Blog",
9
]
- ]
+ ],
+ "name" : "031",
+ "id" : "031"
},
{
"id" : "032",
+ "name" : "032",
"data" : [
[
"Perl",
@@ -574,8 +589,7 @@
"Blog",
10
]
- ],
- "name" : "032"
+ ]
},
{
"id" : "033",
@@ -596,7 +610,7 @@
"name" : "033"
},
{
- "id" : "034",
+ "name" : "034",
"data" : [
[
"Perl",
@@ -611,11 +625,10 @@
11
]
],
- "name" : "034"
+ "id" : "034"
},
{
"name" : "035",
- "id" : "035",
"data" : [
[
"Perl",
@@ -629,9 +642,11 @@
"Blog",
9
]
- ]
+ ],
+ "id" : "035"
},
{
+ "id" : "036",
"name" : "036",
"data" : [
[
@@ -646,11 +661,11 @@
"Blog",
11
]
- ],
- "id" : "036"
+ ]
},
{
"id" : "037",
+ "name" : "037",
"data" : [
[
"Perl",
@@ -664,10 +679,10 @@
"Blog",
9
]
- ],
- "name" : "037"
+ ]
},
{
+ "id" : "038",
"name" : "038",
"data" : [
[
@@ -682,12 +697,10 @@
"Blog",
12
]
- ],
- "id" : "038"
+ ]
},
{
"name" : "039",
- "id" : "039",
"data" : [
[
"Perl",
@@ -701,9 +714,11 @@
"Blog",
12
]
- ]
+ ],
+ "id" : "039"
},
{
+ "id" : "040",
"name" : "040",
"data" : [
[
@@ -718,12 +733,11 @@
"Blog",
10
]
- ],
- "id" : "040"
+ ]
},
{
- "name" : "041",
"id" : "041",
+ "name" : "041",
"data" : [
[
"Perl",
@@ -740,6 +754,7 @@
]
},
{
+ "id" : "042",
"name" : "042",
"data" : [
[
@@ -754,8 +769,7 @@
"Blog",
11
]
- ],
- "id" : "042"
+ ]
},
{
"name" : "043",
@@ -776,7 +790,6 @@
"id" : "043"
},
{
- "name" : "044",
"id" : "044",
"data" : [
[
@@ -791,9 +804,12 @@
"Blog",
11
]
- ]
+ ],
+ "name" : "044"
},
{
+ "id" : "045",
+ "name" : "045",
"data" : [
[
"Perl",
@@ -807,12 +823,10 @@
"Blog",
11
]
- ],
- "id" : "045",
- "name" : "045"
+ ]
},
{
- "id" : "046",
+ "name" : "046",
"data" : [
[
"Perl",
@@ -827,7 +841,7 @@
10
]
],
- "name" : "046"
+ "id" : "046"
},
{
"id" : "047",
@@ -848,6 +862,8 @@
"name" : "047"
},
{
+ "id" : "048",
+ "name" : "048",
"data" : [
[
"Perl",
@@ -861,13 +877,10 @@
"Blog",
12
]
- ],
- "id" : "048",
- "name" : "048"
+ ]
},
{
"name" : "049",
- "id" : "049",
"data" : [
[
"Perl",
@@ -881,10 +894,10 @@
"Blog",
12
]
- ]
+ ],
+ "id" : "049"
},
{
- "id" : "050",
"data" : [
[
"Perl",
@@ -899,10 +912,10 @@
12
]
],
- "name" : "050"
+ "name" : "050",
+ "id" : "050"
},
{
- "name" : "051",
"data" : [
[
"Perl",
@@ -917,11 +930,11 @@
11
]
],
+ "name" : "051",
"id" : "051"
},
{
"name" : "052",
- "id" : "052",
"data" : [
[
"Perl",
@@ -935,10 +948,12 @@
"Blog",
14
]
- ]
+ ],
+ "id" : "052"
},
{
"id" : "053",
+ "name" : "053",
"data" : [
[
"Perl",
@@ -952,10 +967,11 @@
"Blog",
15
]
- ],
- "name" : "053"
+ ]
},
{
+ "id" : "054",
+ "name" : "054",
"data" : [
[
"Perl",
@@ -969,13 +985,11 @@
"Blog",
18
]
- ],
- "id" : "054",
- "name" : "054"
+ ]
},
{
- "name" : "055",
"id" : "055",
+ "name" : "055",
"data" : [
[
"Perl",
@@ -992,7 +1006,6 @@
]
},
{
- "name" : "056",
"id" : "056",
"data" : [
[
@@ -1007,7 +1020,8 @@
"Blog",
17
]
- ]
+ ],
+ "name" : "056"
},
{
"id" : "057",
@@ -1046,7 +1060,6 @@
"name" : "058"
},
{
- "name" : "059",
"data" : [
[
"Perl",
@@ -1061,6 +1074,7 @@
16
]
],
+ "name"