Year 44 - Unique Fashion Party (~46 seconds, no exploit) #224
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I managed to shave of a few seconds from the current solution.
Thze first thing I did was hardcoding some of the steps at the beginning. When stepping towards a wall, a worker will abort doing so very quickly and that is just very slightly faster than doing a loop with an if check. Also we need to step right at least 4 times, so no need to check here. This will mostly only speed up the first few workers at the beginning tho.
Furthermore, it is actually better to use the holes at the top and not at the bottom, even though the top ones are further away. It is better, because the bottleneck is this one wide gap everyone needs to go through. When stepping up, like I am doing here, the path at the bottom is blocked for a shorter amount of time.
Credits should still go to marky1124 as well imo, since this is heavily based on his current version and I merely optimized that solution a bit.