37 lines
1.5 KiB
Org Mode
37 lines
1.5 KiB
Org Mode
#+title: Notes
|
|
* part 2 and i'm struggling.
|
|
maybe i need to mark 'inside' cells while i dig?
|
|
i don't know which is 'outside' from the getgo?
|
|
|
|
if i mark 'all the rightside', will that help to calculate inside?
|
|
* well, if we dont' have instruction with steps:1 i can just count points above and belove the line
|
|
without more complicated things
|
|
|
|
just count 'seenUp' and 'seenDown' if equal - then we changed side
|
|
|
|
and - we shouldn't have 'step1' because all numbers are soooo big.
|
|
|
|
ok. let's do that? with maps of cols.
|
|
** CANCELLED add map[row]map[col]any
|
|
** CANCELLED separate method to set it up after we have all of the BorderCellCols
|
|
** CANCELLED during digInsides on each consecutive - check above and below and count
|
|
when there's a jump - compare counts, to make decision on whether to switch 'isInside'
|
|
** no. just because they are long doesn't mean they won't ever get one near another
|
|
* another idea is to save | and corners, as if we're going from left to right
|
|
this seems reasonable.
|
|
** DONE i guess []SpecialSymbol which has Col and Symbol
|
|
** DONE no, let's make it map. yes will have to init, but yuck anyway
|
|
** TODO then different logic on border building.
|
|
if U \ D - on all but last add '|'
|
|
on last - calc with the next turn, what should be saved 'as if traversing from the left'
|
|
|
|
for L \ R - on last - calc what the turn was
|
|
** TODO !! between last and first movement the corner is unknown.
|
|
so, copy the first instruction to the end?
|
|
** moment of hope.
|
|
my calculation for example input for part 2
|
|
day18 result: 952408144115
|
|
|
|
952408144115
|
|
*** YES.
|