Advent of Code 2021 day 16
12/16/2022, 5:00 AMJonathan Kolberg
12/16/2022, 6:47 AMDan Fingal-Surma
12/16/2022, 7:10 AMDan Fingal-Surma
12/16/2022, 7:10 AMDan Fingal-Surma
12/16/2022, 7:12 AMDan Fingal-Surma
12/16/2022, 7:12 AMDan Fingal-Surma
12/16/2022, 7:12 AMbabel
12/16/2022, 7:24 AMSergei Petunin
12/16/2022, 7:49 AMcurrentSum + totalOpened * stepsLeft
);
- if we open the current valve and walk down the unvisited neighbors, reducing the step count by 2;
- if we don’t open the current valve and go through unvisited neighbors, reducing the step count by 1.nkiesel
12/16/2022, 7:51 AMbabel
12/16/2022, 8:12 AMDan Fingal-Surma
12/16/2022, 8:14 AMSergei Petunin
12/16/2022, 8:15 AMAlyssa Burlton
12/16/2022, 8:26 AMXmx
of 20GB and a hardcoded fudge to get B to complete 😅Karloti
12/16/2022, 8:26 AMJan Durovec
12/16/2022, 8:33 AMTimmy
12/16/2022, 8:36 AMSergei Petunin
12/16/2022, 9:00 AMNode.visitedNeighbors
set, but I still get 1649 instead of 1651 on the test data, and for the actual data it just never completesDan Fingal-Surma
12/16/2022, 10:07 AMJan Durovec
12/16/2022, 10:26 AMSergei Petunin
12/16/2022, 10:35 AMJan Durovec
12/16/2022, 10:36 AMSergei Petunin
12/16/2022, 10:37 AMDan Fingal-Surma
12/16/2022, 10:38 AMJan Durovec
12/16/2022, 10:38 AMDan Fingal-Surma
12/16/2022, 10:38 AMDan Fingal-Surma
12/16/2022, 10:38 AMDan Fingal-Surma
12/16/2022, 10:40 AMPaul Woitaschek
12/16/2022, 10:40 AMcorneil
12/16/2022, 10:45 AMPaul Woitaschek
12/16/2022, 10:45 AMcorneil
12/16/2022, 10:55 AMPaul Woitaschek
12/16/2022, 10:58 AMPaul Woitaschek
12/16/2022, 10:59 AMCognitive Gear
12/16/2022, 11:41 AMJan Durovec
12/16/2022, 12:41 PMSergei Petunin
12/16/2022, 2:54 PMephemient
12/16/2022, 2:59 PMJan Durovec
12/16/2022, 3:33 PMSergei Petunin
12/16/2022, 3:39 PMJan Durovec
12/16/2022, 3:42 PMJan Durovec
12/16/2022, 3:42 PMSergei Petunin
12/16/2022, 4:03 PMJan Durovec
12/16/2022, 4:04 PMCharles Flynn
12/16/2022, 4:08 PMJan Durovec
12/16/2022, 4:10 PMCharles Flynn
12/16/2022, 4:12 PMJan Durovec
12/16/2022, 4:12 PMCharles Flynn
12/16/2022, 4:15 PMJan Durovec
12/16/2022, 4:16 PMJan Durovec
12/16/2022, 4:20 PMCharles Flynn
12/16/2022, 4:27 PMCharles Flynn
12/16/2022, 4:27 PMSergei Petunin
12/16/2022, 4:42 PMSergei Petunin
12/16/2022, 4:53 PMritesh
12/16/2022, 5:18 PMSergei Petunin
12/16/2022, 5:19 PMritesh
12/16/2022, 5:20 PMritesh
12/16/2022, 5:30 PMAA->DD(20)
, from DD, next shortest and max-value is BB (13)
- in this case, it goes via CC
but doesn't grab/opens CC
valve along the way.ephemient
12/16/2022, 5:57 PMephemient
12/16/2022, 6:00 PMBenchmark Mode Cnt Score Error Units
Day16Bench.part1 avgt 5 13.433 ± 1.347 ms/op
Day16Bench.part2 avgt 5 379.480 ± 75.804 ms/op
Paul Woitaschek
12/16/2022, 6:19 PMJonathan Kolberg
12/16/2022, 6:23 PMPaul Woitaschek
12/16/2022, 6:23 PMJonathan Kolberg
12/16/2022, 6:23 PMPaul Woitaschek
12/16/2022, 6:25 PMavailableMinutes - minute-8
it passes the test and is down to 600 ms but I think it’s only right for my input ^^ephemient
12/16/2022, 6:41 PMJonathan Kolberg
12/16/2022, 6:47 PMDan Fingal-Surma
12/16/2022, 6:59 PMDan Fingal-Surma
12/16/2022, 7:01 PMDan Fingal-Surma
12/16/2022, 7:01 PMMichael Böiers
12/16/2022, 7:26 PMritesh
12/16/2022, 10:56 PMDan Fingal-Surma
12/16/2022, 10:57 PMDan Fingal-Surma
12/16/2022, 10:58 PMritesh
12/16/2022, 10:58 PMJonathan Kolberg
12/17/2022, 4:56 AMJonathan Kolberg
12/17/2022, 4:57 AMritesh
12/17/2022, 4:59 AMJoakim Tall
12/17/2022, 9:26 PMJoakim Tall
12/17/2022, 9:26 PMJoakim Tall
12/17/2022, 9:26 PMJoakim Tall
12/17/2022, 9:28 PMJoakim Tall
12/17/2022, 9:28 PMnkiesel
12/17/2022, 9:32 PMnkiesel
12/17/2022, 9:35 PMmaiatoday
12/30/2022, 7:43 AMhashcode()
of the data object and simply store that instead of the state object and then I can make a mutable state object, only one, and just memoize by hashcode. Low hanging improvement which will prevent it allocating objects so much. However…
If I simply keep everything as is and only replace the key in the HashMap with the hashcode of the State, it gets the wrong answer on the test input, The answer is bigger 🤯 Can anyone explain this to me?ritesh
12/30/2022, 7:51 AMephemient
12/30/2022, 2:56 PMmaiatoday
12/30/2022, 3:00 PMmaiatoday
12/30/2022, 3:05 PMritesh
12/30/2022, 11:49 PMritesh
12/31/2022, 9:11 AM