Advent of Code 2024 | Day 17 "Chronospatial Computer"

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ธ.ค. 2024

ความคิดเห็น • 10

  • @hyper-neutrino
    @hyper-neutrino  11 ชั่วโมงที่ผ่านมา +2

    sorry for the audio quality issues, it sounded fine when i listened to it locally :c

  • @97Legends
    @97Legends 3 ชั่วโมงที่ผ่านมา +1

    One thing I'm seeing is the Full Solve doesn't work on the test input. I assume this is because the test input's first instruction is 0.

  • @cursed_nerd
    @cursed_nerd 5 ชั่วโมงที่ผ่านมา

    Thanks for a beautiful explanation.

  • @yajusgakhar6969
    @yajusgakhar6969 10 ชั่วโมงที่ผ่านมา

    One more cheeky thing someone on Discord taught me was that if you want to do a modulo operation a % b where b is some power of 2 (e.g. 8 in this example), you can just do `a & (b - 1)` which is faster.

    • @cursed_nerd
      @cursed_nerd 5 ชั่วโมงที่ผ่านมา

      sick

  • @hyperbolia-44031
    @hyperbolia-44031 10 ชั่วโมงที่ผ่านมา +1

    I think the inputs followed the same structure, barring the XOR constants and the operand of the bxc instruction

  • @pedantic79
    @pedantic79 2 ชั่วโมงที่ผ่านมา

    I believe this doesn't work for my input. The issue is that the ans may not produce the trailing 0. So I have to check run through the full simulation with ans to double check. the recursion will eventually find it.

  • @colinwhittaker4557
    @colinwhittaker4557 7 ชั่วโมงที่ผ่านมา +1

    my input gave a result of 0 when a = 0 which was throwing off my answer because 0

  • @hyperbolia-44031
    @hyperbolia-44031 10 ชั่วโมงที่ผ่านมา

    Also, interestingly, the naive approach takes time 8^l where l is the program length, meaning that 8^16 operations would be needed.

  • @maartenvandermeulen8194
    @maartenvandermeulen8194 5 ชั่วโมงที่ผ่านมา

    If you have done part one, you don't need to decode the specifics, only the structure. The structure of the code (the loop that discards the last three bits each iteration) should be the same for all inputs.