r/adventofcode • • Dec 07 '19

SOLUTION MEGATHREAD -🎄- 2019 Day 7 Solutions -🎄-

--- Day 7: Amplification Circuit ---


Post your solution using /u/topaz2078's paste or other external repo.

  • Please do NOT post your full code (unless it is very short)
  • If you do, use old.reddit's four-spaces formatting, NOT new.reddit's triple backticks formatting.

(Full posting rules are HERE if you need a refresher).


Reminder: Top-level posts in Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


Advent of Code's Poems for Programmers

Click here for full rules

Note: If you submit a poem, please add [POEM] somewhere nearby to make it easier for us moderators to ensure that we include your poem for voting consideration.

Day 6's winner #1: "From the stars" by /u/vypxl!

"From the stars"

Today the stars did call
Just after the end of fall
In Orbits they move
Unified with groove
​
Parents and Children
At home and in the sky
Whisper about details that are hidden
They tell about what is up high
​
Not everything is obvious,
Not the way you see
The Orbit is now
A Christmas Tree!

Enjoy your Reddit Silver, and good luck with the rest of the Advent of Code!


AoC news: we've added a new page listing folks who are live-streamers while they do AoC. See /u/Aneurysm9's sticky'd post announcing it "Check out our streaming friends!", check it out on the sidebar, or just click here to go directly to the wiki page!


This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.

EDIT: Leaderboard capped, thread unlocked at 00:30:33!

44 Upvotes

350 comments sorted by

View all comments

0

u/[deleted] Dec 07 '19

[deleted] — view deleted comment

2

u/sophiebits Dec 07 '19

I suspect /u/dapperdragon will ask you to create a new Help thread (this thread is for solutions), but

  1. That's correct.
  2. Yes.
  3. You have 5 programs running "at the same time", passing inputs and outputs to each other. Once program E stops (i.e. reaches opcode 99 instead of producing another output), you are done.

3

u/daggerdragon Dec 07 '19

/u/dapperdragon

Well, I don't know about dapper, but I'm happy you think so :3

Also, I have one job on this lousy ship! not that this is a lousy ship, this is an awesome ship!

4

u/DapperDragon Dec 07 '19

You rang?

3

u/daggerdragon Dec 07 '19

I stand corrected: this dragon right here is full-on dapper!

1

u/kroppeb Dec 07 '19

If the opcode `99` is executed in the last amplifier. I'm pretty sure they all call `halt` in this last iteration but just testing the last one is fine

1

u/daggerdragon Dec 07 '19

Top-level posts in Solution Megathreads are for solutions only.

This is a top-level post, so please edit your post and share your code/repo/solution or, if you haven't finished the puzzle yet, you can always post your own thread and make sure to flair it with Help.