Skip to content

Commit

Permalink
aoc2024/day24: Add solution
Browse files Browse the repository at this point in the history
Signed-off-by: Andrej Orsula <orsula.andrej@gmail.com>
  • Loading branch information
AndrejOrsula committed Dec 24, 2024
1 parent c144c87 commit 02c24bc
Show file tree
Hide file tree
Showing 4 changed files with 501 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ My solutions to [Advent of Code](https://adventofcode.com) puzzles.
| 20 | [Race Condition](https://adventofcode.com/2024/day/20) | [day20.rs](aoc2024/src/day20.rs) | 335.5 µs | 17.31 ms |
| 21 | [Keypad Conundrum](https://adventofcode.com/2024/day/21) | [day21.rs](aoc2024/src/day21.rs) | 529 ns | 476 ns |
| 22 | [Monkey Market](https://adventofcode.com/2024/day/22) | [day22.rs](aoc2024/src/day22.rs) | 7.427 ms | 13.17 ms |
| 23 | [LAN Party](https://adventofcode.com/2024/day/24) | [day24.rs](aoc2024/src/day24.rs) | 326.8 µs | 147.2 µs |
| 23 | [LAN Party](https://adventofcode.com/2024/day/23) | [day24.rs](aoc2024/src/day23.rs) | 326.8 µs | 147.2 µs |
| 24 | [Crossed Wires](https://adventofcode.com/2024/day/24) | [day23.rs](aoc2024/src/day24.rs) | 85.72 µs | 23.31 µs |

<!-- | 24 | [TODO](https://adventofcode.com/2024/day/23) | [day23.rs](aoc2024/src/day23.rs) | | | -->
<!-- | 25 | [TODO](https://adventofcode.com/2024/day/25) | [day25.rs](aoc2024/src/day25.rs) | | — | -->
Expand Down
313 changes: 313 additions & 0 deletions aoc2024/input/2024/day24.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,313 @@
x00: 1
x01: 0
x02: 0
x03: 1
x04: 1
x05: 1
x06: 0
x07: 0
x08: 0
x09: 1
x10: 0
x11: 0
x12: 0
x13: 0
x14: 0
x15: 1
x16: 1
x17: 0
x18: 1
x19: 0
x20: 0
x21: 0
x22: 0
x23: 1
x24: 1
x25: 0
x26: 0
x27: 0
x28: 1
x29: 0
x30: 1
x31: 0
x32: 0
x33: 0
x34: 1
x35: 1
x36: 1
x37: 0
x38: 1
x39: 1
x40: 0
x41: 0
x42: 0
x43: 1
x44: 1
y00: 1
y01: 1
y02: 1
y03: 1
y04: 0
y05: 1
y06: 0
y07: 1
y08: 0
y09: 1
y10: 1
y11: 1
y12: 1
y13: 1
y14: 1
y15: 0
y16: 0
y17: 0
y18: 1
y19: 1
y20: 1
y21: 1
y22: 1
y23: 1
y24: 0
y25: 1
y26: 1
y27: 0
y28: 1
y29: 0
y30: 1
y31: 0
y32: 1
y33: 0
y34: 1
y35: 1
y36: 0
y37: 1
y38: 0
y39: 0
y40: 0
y41: 0
y42: 0
y43: 0
y44: 1

rds AND wpc -> cmj
vbn XOR mkk -> z13
y04 AND x04 -> bbw
ftn OR swv -> bmw
dkj AND gqs -> vbm
x38 XOR y38 -> bhv
jhh XOR vws -> z04
y38 AND x38 -> tbv
whm AND rbn -> tpt
fkf XOR whs -> z31
x37 XOR y37 -> bmt
y43 AND x43 -> jbc
qkj XOR fdg -> z15
tsq XOR pmr -> z21
x11 XOR y11 -> jtg
x35 XOR y35 -> hqk
whs AND fkf -> vpr
y16 XOR x16 -> sbt
y15 AND x15 -> gmt
tdp AND qqs -> sph
bsn OR bdc -> mkk
y12 AND x12 -> bdc
qmj OR rmv -> tdp
fdg AND qkj -> fjw
wfd XOR cwj -> z36
rgm OR vgp -> cvt
vws AND jhh -> shg
qgd OR ggn -> cvr
x28 AND y28 -> rtf
y42 XOR x42 -> jgh
jsv OR kbr -> cwj
hdp OR rtr -> gms
gdm OR kqg -> wpc
x00 XOR y00 -> z00
x17 AND y17 -> qqc
hrt AND sbt -> dfq
y07 AND x07 -> nsg
y18 AND x18 -> z18
mjm AND njj -> bch
y39 AND x39 -> qnt
x16 AND y16 -> hsb
grq XOR vfq -> z28
rbn XOR whm -> z40
x25 AND y25 -> rwp
x41 AND y41 -> hdp
x42 AND y42 -> ftn
rcm AND rhd -> qvh
wsq XOR cvr -> z19
rwp OR bvm -> gdq
kgd OR kqf -> z10
x40 AND y40 -> gkj
x09 XOR y09 -> rds
jhm AND fqt -> rtr
y07 XOR x07 -> jfr
x35 AND y35 -> kbr
sqr XOR mwq -> mwk
hmc AND brk -> pjk
y23 XOR x23 -> gwq
tdd OR nsg -> cct
y14 XOR x14 -> njj
wtm XOR phh -> z06
wws AND cdh -> dff
thq XOR mfd -> z17
y13 XOR x13 -> vbn
y24 XOR x24 -> hsw
x12 XOR y12 -> jnk
vvj OR hph -> jsp
swf XOR hqk -> z35
jjg OR pjp -> tqk
vbm OR wss -> whs
x22 XOR y22 -> kdn
y11 AND x11 -> pjp
x08 XOR y08 -> cjn
std XOR jfr -> z07
tjj OR vpp -> jhh
pjk OR vpj -> rhd
vkd XOR vtd -> z34
cjn AND cct -> kqg
hnw OR nth -> phh
x30 AND y30 -> wss
ptr OR dnq -> wrn
wfd AND cwj -> vvj
wpd AND ndm -> jcq
jmh XOR mrs -> z24
x29 XOR y29 -> wws
x33 AND y33 -> wvp
y02 AND x02 -> wwc
nfh XOR nqq -> qgd
y30 XOR x30 -> gqs
jcq OR qnt -> rbn
wws XOR cdh -> z29
bmn OR cmj -> mwq
y06 AND x06 -> mgc
wkt OR ddd -> swf
phh AND wtm -> cjd
wvp OR gqp -> vtd
jhm XOR fqt -> z41
x20 XOR y20 -> vcn
gms AND jgh -> swv
y23 AND x23 -> sdd
ndb OR qqc -> nfh
png XOR gdq -> z26
nfh AND nqq -> ggn
x40 XOR y40 -> whm
y33 XOR x33 -> wwp
sph OR hpb -> vfq
vjs OR sfm -> cpv
y43 XOR x43 -> bng
cct XOR cjn -> z08
jmh AND mrs -> bmv
x01 XOR y01 -> brk
tsq AND pmr -> vjs
cwt AND mcd -> pcq
jfr AND std -> tdd
sbt XOR hrt -> z16
y20 AND x20 -> twp
y05 AND x05 -> hnw
y27 XOR x27 -> qqs
bmv OR hsw -> mtn
y10 XOR x10 -> sqr
bmt XOR jsp -> z37
sdd OR hcp -> mrs
shg OR bbw -> ckj
y04 XOR x04 -> vws
jsp AND bmt -> mwp
png AND gdq -> rmv
mwk XOR jtg -> z11
twp OR rqv -> tsq
x19 AND y19 -> dtr
x18 XOR y18 -> nqq
wpc XOR rds -> z09
kdn XOR cpv -> z22
x31 AND y31 -> vjp
rtf OR cbh -> cdh
dkj XOR gqs -> z30
y34 XOR x34 -> vkd
mgc OR cjd -> std
tff AND mtn -> bvm
gwq AND wrn -> hcp
vcn AND spr -> rqv
y44 XOR x44 -> mcd
y01 AND x01 -> vpj
vbn AND mkk -> tsd
tqk AND jnk -> bsn
x27 AND y27 -> hpb
bhv AND kqb -> nrc
spr XOR vcn -> z20
ckj XOR tbw -> z05
y22 AND x22 -> ptr
ckj AND tbw -> nth
cpv AND kdn -> dnq
fjw OR gmt -> hrt
qvh OR wwc -> sgb
gwq XOR wrn -> z23
jgh XOR gms -> z42
y32 AND x32 -> vgp
mwq AND sqr -> kgd
gkj OR tpt -> fqt
x34 AND y34 -> wkt
x14 AND y14 -> pwr
y31 XOR x31 -> fkf
mwk AND jtg -> jjg
y05 XOR x05 -> tbw
pwr OR bch -> fdg
x21 AND y21 -> sfm
vfq AND grq -> cbh
x41 XOR y41 -> jhm
y36 XOR x36 -> wfd
mcr AND bgf -> rgm
psb XOR sgb -> z03
bmw AND bng -> trs
x02 XOR y02 -> rcm
jnk XOR tqk -> z12
dfq OR hsb -> mfd
vtd AND vkd -> ddd
bhv XOR kqb -> z38
y37 AND x37 -> ftj
fmp OR pcq -> z45
brk XOR hmc -> z01
dff OR hcb -> dkj
cvt AND wwp -> z33
x13 AND y13 -> vwv
qqs XOR tdp -> z27
x26 XOR y26 -> png
x15 XOR y15 -> qkj
x17 XOR y17 -> thq
trs OR jbc -> cwt
y36 AND x36 -> hph
x10 AND y10 -> kqf
x06 XOR y06 -> wtm
x32 XOR y32 -> mcr
mtn XOR tff -> z25
y28 XOR x28 -> grq
mwp OR ftj -> kqb
x03 XOR y03 -> psb
x25 XOR y25 -> tff
njj XOR mjm -> z14
y03 AND x03 -> vpp
x00 AND y00 -> hmc
mfd AND thq -> ndb
x26 AND y26 -> qmj
x29 AND y29 -> hcb
y19 XOR x19 -> wsq
bgf XOR mcr -> z32
vpr OR vjp -> bgf
rhd XOR rcm -> z02
bmw XOR bng -> z43
nrc OR tbv -> ndm
y24 AND x24 -> jmh
x44 AND y44 -> fmp
wwp XOR cvt -> gqp
cvr AND wsq -> ghw
x39 XOR y39 -> wpd
x09 AND y09 -> bmn
hqk AND swf -> jsv
y08 AND x08 -> gdm
sgb AND psb -> tjj
vwv OR tsd -> mjm
y21 XOR x21 -> pmr
cwt XOR mcd -> z44
ghw OR dtr -> spr
wpd XOR ndm -> tbv
Loading

0 comments on commit 02c24bc

Please sign in to comment.