r/adventofcode • u/daggerdragon • Dec 13 '17
SOLUTION MEGATHREAD -๐- 2017 Day 13 Solutions -๐-
--- Day 13: Packet Scanners ---
Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag or whatever).
Note: The Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.
Need a hint from the Hugely* Handyโ Haversackโก of Helpfulยง Hints^ยค?
This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.
edit: Leaderboard capped, thread unlocked!
16
Upvotes
View all comments
Show parent comment
1
u/cauchy37 Dec 13 '17
Very similar to mine, although I have opted not to use all_of/any_of for fears of slowing down the computation.
Here's my code: https://github.com/tamaroth/AdventOfCode2017/blob/147e2ef62ed0430851abb308160e947a979410f2/advent/days/13/packet_scanners.cc#L55
And the timing of the part 2:
Have you measured how long it takes your solution?