Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,15 +1,15 @@
sub zig_zag {
my ($w, $h, @r, $n) = @_;
$r[ $_->[1] ][ $_->[0] ] = $n++ for
sort { $a->[0] + $a->[1] <=> $b->[0] + $b->[1] or
($a->[0] + $a->[1]) % 2
? $a->[1] <=> $b->[1]
: $a->[0] <=> $b->[0]
}
map { my $e = $_;
map{ [$e, $_] } 0 .. $w-1
} 0 .. $h - 1;
$r[ $_->[1] ][ $_->[0] ] = $n++ for
sort { $a->[0] + $a->[1] <=> $b->[0] + $b->[1] or
($a->[0] + $a->[1]) % 2
? $a->[1] <=> $b->[1]
: $a->[0] <=> $b->[0]
}
map { my $e = $_;
map{ [$e, $_] } 0 .. $w-1
} 0 .. $h - 1;
@r
}