main
Yanick Champoux 2017-12-05 12:47:22 -05:00
parent 1e20c2a640
commit 424e0310af
3 changed files with 1124 additions and 0 deletions

1097
05/input.txt Normal file

File diff suppressed because it is too large Load Diff

13
05/maze.pl Normal file
View File

@ -0,0 +1,13 @@
use 5.20.0;
my @maze = <>;
my $position = 0;
my $steps = 0;
while( $position < @maze ) {
$steps++;
$position += $maze[$position]++;
}
say $steps;

14
05/maze2.pl Normal file
View File

@ -0,0 +1,14 @@
use 5.20.0;
my @maze = <>;
my $position = 0;
my $steps = 0;
while( $position < @maze ) {
$steps++;
my $i = $position;
$position += $maze[$position];
$maze[$i] += $maze[$i] > 2 ? -1 : 1;
}
say $steps;