Created
December 4, 2025 21:42
-
-
Save Anticubex/1423b454a964d1f3d02149b9392c46f1 to your computer and use it in GitHub Desktop.
Advent of Code 2025 Day 4 Uiua solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # AOC Day 4 | |
| # uiua.org/pad | |
| # Uiua 0.18.0-dev.3 | |
| $ ..@@.@@@@. | |
| $ @@@.@.@.@@ | |
| $ @@@@@.@.@@ | |
| $ @.@@@@..@. | |
| $ @@.@@@@.@@ | |
| $ .@@@@@@@.@ | |
| $ .@.@.@.@@@ | |
| $ @.@@@.@@@@ | |
| $ .@@@@@@@@. | |
| $ @.@.@@@.@. | |
| Test ← | |
| Data ← &fras "AOC_day4.txt" | |
| Accessible ← ⬚0⧈(×⊃(⊡1_1|≤4/+/+)) 3_3 | |
| Part₁ ← ( | |
| ÷₁₈-@.⊜∘⊸≠@\n | |
| Accessible | |
| /+/+ | |
| ) | |
| Part₁ Test # 13 | |
| Part₁ Data | |
| Part₂ ← ( | |
| ÷₁₈-@.⊜∘⊸≠@\n | |
| 1 | |
| ⊸⍢( | |
| ◌ | |
| ⊸Accessible | |
| ⍥₂(⍉⍥₂(⇌↘₁)) # Trim filled border | |
| ⊃(/+/+)- | |
| | >₀) | |
| /+/+-◌ | |
| ) | |
| Part₂ Test # 43 | |
| # Pretty slow, I needed like 30s of execution time | |
| Part₂ Data | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment