r/adventofcode • u/daggerdragon • 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
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!
View all comments
Show parent comment
1
u/[deleted] Dec 07 '19
I don't think that's it. (Here's how I'm running part 2)[https://github.com/bbstilson/adventofcode/pull/21/files#diff-ce601ac3ebd3ef0a98c9e4f1fc19e364R21-R34].
If I switch to head, I still get StackoverFlow when inside the fold.
It seems like there's some poison permutation because if I run with known, good phase settings, and a test program, then it runs fine:
That code will produce 120 values that are the same since it's running on the same phase settings, but it does in fact return
139629729as expected.Even if I map over all permutation over test input, it works:
This outputs
139629729.But if I switch to using the real input, it crashes.