Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2021 Day 2 (BaseA Style) - Dive!

jdunkerley79
ACE Emeritus
ACE Emeritus

Discussion thread for day 2 of the Advent of Code - https://adventofcode.com/2021/day/2

26 REPLIES 26
cgoodman3
14 - Magnetar
14 - Magnetar

I was awake, a little after 5am but still at a time zone disadvantage!

 

Spoiler
cgoodman3_0-1638424444674.png

Lost a couple of mins on the second part by copying my multi-row formula but forgetting to update part of the IF statement, and couldn't work out why I got the wrong answer so had to load in the example to check my logic when I discovered the typo in my IF.

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
NicoleJohnson
ACE Emeritus
ACE Emeritus

WELL. This one was, in the end, deceptively simple. Extremely grateful for @estherb47 who helped me re-read the instructions again. *face palm*

 

Spoiler
What got me on this one was not understanding that in the Part 2 instructions, they basically started new - I mistakenly assumed that the rules from Part 1 still applied as far as what happens when you got an up or down instruction. Some ambiguous wording got me confused for a bit, but as soon as that mistaken assumption was cleared up, it was an easy fix/straightforward data prep solution. Look at all those pretty blue tools...
NicoleJohnson_0-1638424418177.png

 

Cheers!

NJ 

cgoodman3
14 - Magnetar
14 - Magnetar

Yes I managed to beat @NicoleJohnson at posting! But I think you got the solution for the second star just before me!

 

Tip: If you want tool golf points then you don't need the first formula tool to set the positions at 0, as the multi-row formula has the option to set rows that don't exist to zero, so for the first commands they will all be based from 0,0

cgoodman3_0-1638424907590.png

 

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
NicoleJohnson
ACE Emeritus
ACE Emeritus

Ahhh yes @cgoodman3 , but much like when I play actual golf, why hit the ball once when you can hit it three or four times instead? 🤣

 

Excellent tip. You get the green jacket today, particularly with your Part 1 “tool golf” solution!!

 

NJ

cgoodman3
14 - Magnetar
14 - Magnetar

I think you can do part 1 with just 1 multi row and do the calculation at the same time as working out the movement but I didn’t have the headspace to do it this morning.

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
OllieClarke
15 - Aurora
15 - Aurora

Feeling a multi-row theme so far

Spoiler
OllieClarke_0-1638435675764.png

 

AkimasaKajitani
17 - Castor
17 - Castor

It took long time to understand the situation at Part2.

 

Spoiler
AkimasaKajitani_1-1638436331530.png

 

https://github.com/AkimasaKajitani/AdventOfCode/tree/main/2021

jdunkerley79
ACE Emeritus
ACE Emeritus

Bit late getting to it today...

 

Spoiler
jdunkerley79_0-1638445563717.png

Spotter part 2 was a small extension to part 1

AmandaH
8 - Asteroid

Another easy day, but oddly satisfying. Anyone else feel the need to name their submarine?

 

Spoiler
Day2_Solution.PNG

 

Labels