Advent of Code 2020 - BaseA Style (Day 9)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Discussion thread for day 9 of the Advent of Code : https://adventofcode.com/2020/day/9
- Labels:
- Advent of Code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Day 9!
Today I made Iterative macro, too.
I'd like to learn Non-Iterative version by anyone's workflow.
Part1 Iterative Macro:
Part2 Iterative Macro:
But It takes less than a minute, so I think no problem.
As anonymous user #1105310
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Fun problem... Again no macros - but I did cheat and use Alteryx to generate a super long expression for a multi-field formula for part 1. Without adding the recordID I needed for Part2, part1 has a (cheater) golf score of 3. Part2 looks like almost exactly the same solution as @jdunkerley79
https://github.com/NedHarding/Advent2020
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Bit of data explosion never hurt anyone 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Really interesting to see these non-macro alternatives and that they seem to be faster computationally too - enjoying these and learning a ton!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Non-macro part 1 and iterative part 2. Runs in 4.4 seconds non-Amped and errors in Amp and 3.4 in Amp.
The first time I tried it in Amp, the logic in my macro failed because it implicitly assumed that the records in the iterative input wouldn't change order between iterations. It's technically not between iterations, but in the tools that prepare the records to be sent out the iterative output. The solution was to add a Sort tool before the multi-row.
+1 Amp knowledge
Part 2 uses an iterative macro with a multirow to generate a running total starting from Engine.Iterationnumber +1 and ending when the total >= target
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
A no macro solution with generate rows creating the data.
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Went for 2 x iterative macros! Not clean at all, but just happy I got to the answer 😂
Part A iterative macro (messy!):
Part B iterative macro:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Definitely not winning on tool golf, but my speed is on point. Or on fleek as my 18 year old niece tells me I should be saying.
1.7 seconds.
Still going with no macros
Top flow generates all possibilities of number sums that could be used. Middle flow generates just the ones that will be used. These are joined together. Any set of numbers that doesn't find a match is output.
Second part took a bit more thought. Didn't want to generate all combos of numbers, so tried out different looks at the running total. Turns out that subtracting the number from the running total gets you the segment of comparison.
Loads of generate rows tools got the job done. Would be lovely to feed a measure into the sample tool, which was more performant for me than filters,, to make this totally dynamic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

- « Previous
-
- 1
- 2
- Next »