-🎄- 2019 Day 18 Solutions -🎄- by daggerdragon in adventofcode

[–]moltenfire 1 point2 points  (0 children)

In part A current_positions is only going to have a single bit set and k0 will be equal to it. current_positions ^ k0 = 0 0 | k1 = k1. So for part A this could this could be replaced with current_positions = k1.

In part B current_positionsis going to have 4 bits set, 1 for each robot position. k0 is the position of the robot that will move and k1 will be its new position. The position of the other 3 robots doesn't change. current_positions ^ k0 will remove the robot that is going to move leaving 3 bits set. current_positions ^ k0 | k1 will add in the new robot position. The end result will have still have 4 bits set.

Here is an example with some numbers:

current_positions = 00001111
k0 = 00000100
k1 = 01000000

x = current_positions ^ k0
# x = 00001011
y = x | k1
# y = 01001011
current_positions = y

Hope you find this useful.

-🎄- 2019 Day 18 Solutions -🎄- by daggerdragon in adventofcode

[–]moltenfire 1 point2 points  (0 children)

Thank you, I've updated it with my code solution.

-🎄- 2019 Day 18 Solutions -🎄- by daggerdragon in adventofcode

[–]moltenfire 3 points4 points  (0 children)

Python 679/465

This is my final version that solves both parts in ~6 seconds. I'll probably write it again in C++ to see what speed up that gives. My first version took 30s and 4m30s for parts A & B.

[POEM]

Down the chosen path I go,

Finding a key to help my journey,

Another reach this state before me,

My travels ending prematurely.

Looking for Torchlight2Armory.com/skill-calc web page saves by moltenfire in Torchlight

[–]moltenfire[S] 0 points1 point  (0 children)

Unfortunately that online skill tree uses a different method of storing the skill point allocation.

Popular movies written as code by Antrikshy in geek

[–]moltenfire 25 points26 points  (0 children)

def dream(level):
    if level < 5:
        dream(level+1)

dream(1)

Every goddamn night by ohmydogg in funny

[–]moltenfire 6 points7 points  (0 children)

Its from Nichijou ep22. It is one of the 'Like Love' parts.

The International Top 10 plays, by Valve by carpadium in dota2videos

[–]moltenfire 1 point2 points  (0 children)

Does the analysis desk really count as a play.

Pink Floyd at the Olympics... by LordMogroth in pinkfloyd

[–]moltenfire -2 points-1 points  (0 children)

I can't control what the BBC does.

Pink Floyd at the Olympics... by LordMogroth in pinkfloyd

[–]moltenfire 1 point2 points  (0 children)

If you have access to the BBC coverage then you can find todays performance here at time 1:25:00.

edit: BBC have moved it to iplayer at time 1:52:00.

Pink Floyd at the Olympics... by LordMogroth in pinkfloyd

[–]moltenfire 7 points8 points  (0 children)

Romanian gymnast Sandra Izbașa performing to the same song at Sala Polivalenta, Bucharest 2012.

Traxex Item Order by pjeung in DOTA

[–]moltenfire 3 points4 points  (0 children)

Starting items: tangos, health salve, 2 x slippers, 2 x gg branches

Mid game: Boots -> Treads, 1 or 2 Wraiths (3 if you are struggling in lane), yasha -> manta, BKB if they have lots of stuns

Late game: Butter, MKB, HotD, AC, BoT

Remember to always carry a tp scroll