From: Ben Harris Date: Sat, 25 May 2024 23:12:29 +0000 (+0100) Subject: 18a: comment correction X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=1576febc7b020326488c75e66fb5ee43d2be9081;p=aoc-2022.git 18a: comment correction --- diff --git a/18/18a.bqn b/18/18a.bqn index 0d0e06f..f467a13 100644 --- a/18/18a.bqn +++ b/18/18a.bqn @@ -9,13 +9,13 @@ Prep←{ cubes←{ •ParseFloat¨(','=𝕩)Split 𝕩 }¨𝕩 + # We assume that all co-ordinates are non-negitive. # "2" here allows a margin for shifting into droplet←(2+⌈˝>cubes)⥊0 droplet↩1¨⌾(cubes⊸⊑)droplet } Main←{ 𝕊 droplet: - # We assume that all co-ordinates are strictly positive. NSurfacesInDir←{ +´⥊𝕩≠»𝕩 } +´{NSurfacesInDir ⍉⍟𝕩 droplet}¨↕=droplet }