Advent of Code 2021 day 21
12/21/2022, 5:00 AMSergei Petunin
12/21/2022, 6:12 AMJonathan Kolberg
12/21/2022, 6:18 AMTimmy
12/21/2022, 6:30 AMSergei Petunin
12/21/2022, 6:33 AMSergei Petunin
12/21/2022, 6:47 AMJonathan Kolberg
12/21/2022, 7:38 AMLidonis Calhau
12/21/2022, 7:41 AMJonathan Kolberg
12/21/2022, 7:49 AMnkiesel
12/21/2022, 8:50 AMJonathan Kolberg
12/21/2022, 8:55 AMJonathan Kolberg
12/21/2022, 9:44 AMJonathan Kolberg
12/21/2022, 9:51 AMritesh
12/21/2022, 10:13 AMephemient
12/21/2022, 12:16 PMephemient
12/21/2022, 12:17 PMephemient
12/21/2022, 12:17 PMm x + b
and it worked, so that's what I'm going withphldavies
12/21/2022, 1:49 PMphldavies
12/21/2022, 1:52 PMhumn
is in, evaluating the other branch and then rearranging - except by the time I come to solve it I’ve already evaluated all possible constant branches.nkiesel
12/21/2022, 4:19 PMephemient
12/21/2022, 4:23 PMhumn²
or humn¯¹
or other exponents, but I took it outSergei Petunin
12/21/2022, 5:05 PMephemient
12/21/2022, 5:10 PMOzioma Ogbe
12/21/2022, 5:31 PMSergei Petunin
12/21/2022, 5:40 PMOzioma Ogbe
12/21/2022, 5:46 PMrkechols
12/21/2022, 6:55 PMhumn
clearing those cache entries. Then I do like Norbert said: walk down the tree along the path of unknowns (no val in cache) reversing the calculations from parent + known child to get the needed value of the unknown child.ephemient
12/21/2022, 6:58 PMhumn
as well, otherwise
root = aaaa + bbbb
aaaa = humn * humn
bbbb = 1
rkechols
12/21/2022, 7:01 PMHasan Gilmanov
12/21/2022, 7:27 PMRiccardo Lippolis
12/21/2022, 9:45 PMby lazy
for the evaluation worked nicely. For the second part, basically the same solution as @nkiesel indeed 👍nkiesel
12/21/2022, 10:34 PMephemient
12/21/2022, 10:36 PMJon Senchyna
12/22/2022, 12:07 AMMichael Böiers
12/22/2022, 2:03 PMMichael Böiers
12/27/2022, 6:37 PMJonathan Kolberg
12/28/2022, 6:53 PM