https://kotlinlang.org logo
#advent-of-code
Title
# advent-of-code
r

rocketraman

12/17/2019, 5:45 PM
Hey guys, I'm back on day 7, part 1 (yeah, a bit behind :-)) -- I was happy because (seemingly) my existing computer from day 5 was sufficient for day 7 without any changes. However, upon testing, I see my code works on the specific phases given, but as far as I can tell those are not the max thruster values of those programs. Can someone confirm for me what the output of program
Copy code
3,15,3,16,1002,16,10,16,1,16,15,15,4,15,99,0,0
should be with phases
4,3,2,2,0
? It should be less than
43210
according to the text, but I get
43220
.
m

mickeelm

12/17/2019, 6:10 PM
I get the same result - 43220 with my part 1 solution. Did you first submit 43210 and you got the answer that it was too high?
But...hmmm, what kind of program is this? It just outputs the phases. Phases 1,2,3,4,0 gives you the output 12340 🤷‍♂️
r

rocketraman

12/17/2019, 6:12 PM
My answer to the real input is too high. I'm deciding with the test programs given and I get the right answer for all of them for the specific phases shown, but those are not the max values of all possible phases for those programs, as is stated by the puzzle.
m

mickeelm

12/17/2019, 6:14 PM
All right, yeah I see that now from the examples. What about the other test programs, do you get the expected results there?
r

rocketraman

12/17/2019, 6:14 PM
I do but same deal... The specific phases shown work but those are not the max values of all possible phases as far as I can tell.
m

mickeelm

12/17/2019, 6:15 PM
Depending on if you want to cheat or not, you can just DM me your input and I'll run it. I mean I can see if I get another result than you at least
Which I guess, wouldn't really be cheating 😄
r

rocketraman

12/17/2019, 6:16 PM
The input? I'm just using the test inputs in the text.
m

mickeelm

12/17/2019, 6:18 PM
What I meant was your puzzle input, I can run that through my program if you wish, and see if I get another result. But...
r

rocketraman

12/17/2019, 6:19 PM
I'm not getting the right result to the actual puzzle input so presumably yours would indeed be different.
m

mickeelm

12/17/2019, 6:19 PM
You wrote that it says in the text, that 4,3,2,2,0 should be less than 43210 according to the text. What do you mean there? The example uses 4,3,2,1,0 and the result expected is 43210.
Yeah I was just thinking that maybe there could be an error on the AoC side, e.g. that you indeed have the right answer or so. So just to double check
r

rocketraman

12/17/2019, 6:21 PM
Right but it said that is the maximum thruster value for that program. But if phase 43220 outputs a larger value then 43210 is not the max. The max appears to be 44444.
Which makes sense as it seems all that program does is output the phase values.
m

mickeelm

12/17/2019, 6:22 PM
I think he means the max for that phase combination
r

rocketraman

12/17/2019, 6:22 PM
That makes no sense. For a given phase combination there is only one output value.
From the last amplifier
m

mickeelm

12/17/2019, 6:23 PM
YOu are right, sorry
It was a couple of days ago
BUT
You are only allowed to use each phase setting once per amplifier
now I remember 🙂
r

rocketraman

12/17/2019, 6:24 PM
Aha!
m

mickeelm

12/17/2019, 6:24 PM
So 43220 is illegal 🙂
r

rocketraman

12/17/2019, 6:25 PM
Gotcha! That's my problem.
m

mickeelm

12/17/2019, 6:25 PM
Got confused there for a bit, but great, that should be your solution then 🙂
r

rocketraman

12/17/2019, 6:26 PM
Yup should be easy to do, thanks!
m

mickeelm

12/17/2019, 6:26 PM
Np
3 Views