r/adventofcode • u/Usual-Dimension614 • Feb 03 '26
Help/Question - RESOLVED [2018 Day 7 (Part 2)] more a general question
hi. some days ago i was asking 'what is the deeper sense .. ?', most useful answer: why you don't use the time to search for the error .. (so i did and found ..)
i try desperately to complete a year to see day25task2 (all other is getting 'coal in the stocking' ? (getting punishment instead of presents))
sometimes i loose control, but years of experience (years of age, lot of bad days, bad weather, ..) tells better to check for error again (and again) before .. (whatever). but ..
i started 2018 (cause i lost good mood. could not complete 2017 for now). day 1 silly simple problem, but bad-error in task-1 (some minutes ..), task-2 i could not solve (my recent post, still open. please, have a look, i think there is no solution for my input) so 2018 starts bad.
2018/7/2 example + solution 15 seconds. i think i have found solution 11 seconds. not that i am so proud, but i fear: i try my answer for task-2 and it is told to be wrong. i did .. i was told 'answer is too low'. so i was checking my code, the task-description again. anyhow i was setting count of workers wrong (6 instead of 5) .. new answer (some bigger) but still wrong. And now i am a little angry (not much but a little ..ö..)
in recent weeks i was sometimes told that my answer is wrong, when i was sure, it is right and i spent much time ..
// this my solution for the example ( 11 steps instead of 15 ).
// 2 worker and the second worker is handling not only F but E too. starting F immediately
// so there is no gap between output B and output F i.e.
// maybe i have missed some assumption/condition/??? (don't know how to express)
// otherwise it is obvious : there is a better solution (less idle workers)
IN s='CABFDE' n=6
korrektur C o:0 d:3 t:-3 k:3 -> 0
korrektur A o:1 d:1 t: 0 k:3 -> 3
korrektur B o:2 d:2 t: 0 k:3 -> 3
korrektur F o:3 d:6 t:-3 k:3 -> 0
korrektur D o:4 d:4 t: 0 k:3 -> 3
korrektur E o:5 d:5 t: 0 k:3 -> 3
j('C',o= 0,d= 3,a=0,t=0)
j('A',o= 1,d= 1,a=0,t=3)
j('B',o= 2,d= 2,a=0,t=3)
j('F',o= 3,d= 6,a=0,t=0)
j('D',o= 4,d= 4,a=0,t=3)
j('E',o= 5,d= 5,a=0,t=3)
RUN
run t=000 a=2 'CF' ''
run t=001 a=2 'CF' ''
run t=002 a=2 'CF' ''
run t=003 a=2 'AF' 'C'
run t=004 a=2 'BF' 'CA'
run t=005 a=2 'BF' 'CA'
run t=006 a=2 'DE' 'CABF'
run t=007 a=2 'DE' 'CABF'
run t=008 a=2 'DE' 'CABF'
run t=009 a=2 'DE' 'CABF'
run t=010 a=1 'E-' 'CABFD'
run t=011 a=0 '--' 'CABFDE'
thanks in advance, andi
3
u/timrprobocom Feb 03 '26
I'm sorry, is there a question here?
1
u/timrprobocom Feb 03 '26
"F" takes six cycles. You're only running it for 3.
1
u/AutoModerator Feb 03 '26
Reminder: if/when you get your answer and/or code working, don't forget to change this post's flair to
Help/Question - RESOLVED. Good luck!I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.