aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Mochan <mochan@fis.unam.mx>2021-01-18 17:22:29 -0600
committerLuis Mochan <mochan@fis.unam.mx>2021-01-18 17:22:29 -0600
commit6156f6c6ee8cec4e44300911f05a6ff371977c95 (patch)
tree3d2d464a32b317e310d0d3343fefa06d4bd46b41
parentdf99ff7d6e2c429536b357e76576142aca1aeed5 (diff)
downloadperlweeklychallenge-club-6156f6c6ee8cec4e44300911f05a6ff371977c95.tar.gz
perlweeklychallenge-club-6156f6c6ee8cec4e44300911f05a6ff371977c95.tar.bz2
perlweeklychallenge-club-6156f6c6ee8cec4e44300911f05a6ff371977c95.zip
Flag cost-free operations
-rwxr-xr-xchallenge-096/wlmb/perl/ch-2.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-096/wlmb/perl/ch-2.pl b/challenge-096/wlmb/perl/ch-2.pl
index 3ad00b6cae..fa59046592 100755
--- a/challenge-096/wlmb/perl/ch-2.pl
+++ b/challenge-096/wlmb/perl/ch-2.pl
@@ -51,7 +51,7 @@ my ($i, $j)=($from_size, $to_size);
while($i>0 || $j>0){
my $operation=$operations->[$i][$j];
if($operation eq 'k'){
- unshift @operations, "Keep $from[$i-1]";
+ unshift @operations, "(Keep $from[$i-1])";
--$i;
--$j;
next;
@@ -72,7 +72,7 @@ while($i>0 || $j>0){
--$i;
next;
}
- die "Wrong operation!";
+ die "Wrong operation!"; # Shouldn't happen
}
say "Inputs: \"$from\" -> \"$to\"\nOutput: $total_cost\n";