From 6b78b4de6ec5f96d82be5b153294797074c8c2b1 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 4 Jul 2025 19:16:27 +0900 Subject: feat(blog/nuldoc): update dependencies --- .../posts/2025-01-08/phperkaigi-2023-tokens-q1/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'services/blog/public/posts/2025-01-08') diff --git a/services/blog/public/posts/2025-01-08/phperkaigi-2023-tokens-q1/index.html b/services/blog/public/posts/2025-01-08/phperkaigi-2023-tokens-q1/index.html index e7cd5282..15d0aa00 100644 --- a/services/blog/public/posts/2025-01-08/phperkaigi-2023-tokens-q1/index.html +++ b/services/blog/public/posts/2025-01-08/phperkaigi-2023-tokens-q1/index.html @@ -309,7 +309,7 @@ $cs[$y*$w + $x] = ($x*$y === 0 || $x === $w-1 || $y === $h-1) ? 0 : $b[122+($y-1)*($w-1)+$x-1]; -$i = stream_isatty(STDIN) +$i = stream_isatty(STDIN) ? [] : array_map(ord(...), str_split(trim((string) fgets(STDIN)))); $m = []; @@ -326,7 +326,7 @@ echo "infinite loop detected\n"; break; $c1 = $cs[$pc]; - $y = (6 + intdiv($c1-2, 3) - intdiv($c0-2, 3)) % 6; + $y = (6 + intdiv($c1-2, 3) - intdiv($c0-2, 3)) % 6; $x = (3 + $c1%3 - $c0%3) % 3; match (($c0 !== 1) * ($c1 !== 1) * ($y*3 + $x)) { 1 => $m[] = $b, @@ -354,7 +354,7 @@ $v = []; if ($c1 === 1) { $x = $pc % $w; - $y = intdiv($pc, $w); + $y = intdiv($pc, $w); $e = [($y+1)*$w-1, ($h-1)*$w+$x, $y*$w, $x][$dp]; $z = [1, $w, -1, -$w][$dp]; for ($ep = $pc; $ep !== $e; $ep += $z) @@ -372,9 +372,9 @@ if (isset($v[$qp])) continue; $q[] = $qp; $qx = $qp % $w; - $qy = intdiv($qp, $w); + $qy = intdiv($qp, $w); $x = $ep % $w; - $y = intdiv($ep, $w); + $y = intdiv($ep, $w); if ( ($dp === 0 && ($x < $qx || ($x === $qx && ($y<=>$qy) === $cc))) || ($dp === 1 && ($y < $qy || ($y === $qy && ($qx<=>$x) === $cc))) -- cgit v1.2.3-70-g09d2