-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
......#....# | ||
...#....0... | ||
....#0....#. | ||
..#....0.... | ||
....0....#.. | ||
.#....A..... | ||
...#........ | ||
#......#.... | ||
........A... | ||
.........A.. | ||
..........#. | ||
..........#. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
...s.............................................. | ||
...................w......K.......t............... | ||
........s......................................... | ||
.......s......w...............1................... | ||
.........w5....................................... | ||
.......................t.F........................ | ||
.................................................. | ||
F................................1...........d.... | ||
.........................5......................K. | ||
............5.................R..............KZ... | ||
....F.....q.........w..............1.....t........ | ||
............8.......I............................. | ||
..........8.................t....................K | ||
...........8.................5.....Z.............. | ||
.........q..............................Z...d..U.. | ||
...................Y.q...R........................ | ||
....................E.....z...............y....... | ||
..........................................U....... | ||
.....F.................................k........S. | ||
............q...................d................. | ||
.................................R................ | ||
..x....................................U.........y | ||
.......x.........................E..M...U..d...... | ||
......z.......X............................4...... | ||
...............I....m....M......R............y.... | ||
.......z...................................k..e... | ||
..f..z.......................................e.... | ||
...f.I..........7..u..........M................D.. | ||
.......X..I.......x.................k............. | ||
.........X.......7....................4.......S... | ||
....................u9...T.....3.Z....o..........6 | ||
........f.......D..3....u..................S...... | ||
...W...0.........................................D | ||
.....................T................E.......m... | ||
...8....Y............f........T4.................. | ||
......Y........................................... | ||
....0.............3............................... | ||
....................3.T.....................k..... | ||
.......................u..............6........... | ||
...........................6..........9........e.. | ||
..................4....7.............o..........D. | ||
.................................M...E..o......... | ||
...i.................O...........................Q | ||
.....0.i.....................................m.2.. | ||
.......Y.r........7..............S..O..2.......m.. | ||
.....r......0.............O....................... | ||
..................................Q............... | ||
........................6................o......Q. | ||
..W...r.................................9......... | ||
.W.........................O........2............. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# https://adventofcode.com/2024/day/8 | ||
|
||
# uiua 0.14.0-dev.7 | ||
# Experimental! | ||
|
||
# ? matrix | ||
🔤 ← $chars ▽⊸≠@. ▽⊸≠@# ◴/⊂ | ||
|
||
# ? char matrix | ||
🗺 ← $coords ⊚= | ||
|
||
# ? antennas | ||
👥 ← $pairs ⧅<2 | ||
|
||
# ? pair | ||
〰️ ← $antinodes /⊂ ≡⍜°⊟⊃(+⊸-:|+⊸-) | ||
|
||
# ? coord coordmax | ||
🏰 ← $isinside ×⊃(/×<:|/×≥₀) | ||
┌─╴🧪 | ||
⍤⤙≍ 0 🏰 ¯1_¯1 10_10 | ||
⍤⤙≍ 1 🏰 5_5 10_10 | ||
⍤⤙≍ 1 🏰 0_0 10_10 | ||
⍤⤙≍ 0 🏰 10_10 10_10 | ||
└─╴ | ||
|
||
🐪 ← ( | ||
⊜∘⊸≠@\n | ||
⊃(/◇⊂≡(□〰️👥🗺)⊙¤⊸🔤|△) | ||
▽⤚≡🏰⊙¤ | ||
⧻◴ | ||
) | ||
┌─╴🧪 | ||
⍤⤙≍ 14 🐪 &fras"example.txt" | ||
⍤⤙≍ 240 🐪 &fras"input.txt" | ||
└─╴ | ||
|
||
🔧 ← ⍜▽⋅∞⊸=¯∞ | ||
|
||
# ? antennapair coordmax | ||
➰ ← ( | ||
⊚↯:1: | ||
⊸(:¤): | ||
≡(/=🔧/÷-¤) | ||
▽ | ||
) | ||
┌─╴🧪 | ||
⍤⤙≍ [0_0 1_3 2_6 3_9] ➰ [0_0 1_3] 10_10 | ||
⍤⤙≍ [0_11 1_8 2_5 3_2] ➰ [1_8 2_5] 12_12 | ||
└─╴ | ||
|
||
🐫 ← ( | ||
⊜∘⊸≠@\n | ||
⊃(/◇⊂ ≡(□👥🗺)⊙¤⊸🔤|△) | ||
/◇⊂≡(□➰)⊙¤ | ||
⧻◴ | ||
) | ||
┌─╴🧪 | ||
⍤⤙≍ 34 🐫 &fras"example.txt" | ||
⍤⤙≍ 955 🐫 &fras"input.txt" | ||
└─╴ |