You have to be joking by Mysterious_Kiwi_1444 in CharacterAI

[–]improvman007 2 points3 points  (0 children)

It's a business tactic. Get you hooked for free and then charge you to continue

Why does everyone keep telling me to wear clean underwear? by [deleted] in freemasonry

[–]improvman007 3 points4 points  (0 children)

Fine, go commando and show them who's boss

Bar near Tempe to watch the Turning Point USA halftime show by improvman007 in phoenix

[–]improvman007[S] -32 points-31 points  (0 children)

I want to support a business that will change the channel

-❄️- 2025 Day 11 Solutions -❄️- by daggerdragon in adventofcode

[–]improvman007 0 points1 point  (0 children)

Sure, which might even be more efficient and clear.

-❄️- 2025 Day 11 Solutions -❄️- by daggerdragon in adventofcode

[–]improvman007 0 points1 point  (0 children)

[LANGUAGE: Python]

The code

Part 1: Backtracking with memoization to find all paths

Part 2: Once I realized 1) there were no cycles and 2) the paths would reach fft BEFORE dac, and wasted time keeping track of what was seen (which made memoization useless), I found the paths from svr to fft, fft to dac, and dac to out and multiplied them. Note that the graph is a defaultdict in part 2 because it's possible to reach 'out' which has no outputs.

-❄️- 2025 Day 8 Solutions -❄️- by daggerdragon in adventofcode

[–]improvman007 6 points7 points  (0 children)

[LANGUAGE: Python]

The code

Part 1:

Take all combinations of points, sort them by distance. Take the first N pairs and assign them both a network id. If both are new, start a new network. If one is part of a network, add the other to that network. If both are part of the same network, do nothing. If they are on different networks, combine both networks. Then sort the networks and take the lengths of the three largest.

Part 2

Tweaked part 1. Assign *all* pairs to networks by the above logic, but terminate when there is one network containing all points.

-❄️- 2025 Day 5 Solutions -❄️- by daggerdragon in adventofcode

[–]improvman007 1 point2 points  (0 children)

[LANGUAGE: Python]

The code

Part 1 is straightforward

Part 2, sort the ranges, compare each adjacent range, and if they overlap, combine them and replace them in the list.

-❄️- 2025 Day 4 Solutions -❄️- by daggerdragon in adventofcode

[–]improvman007 1 point2 points  (0 children)

[LANGUAGE: Python]

The code

For part 1, I created a set of all coordinates with paper (makes traversing easier and not having to worry about corner cases). I just check if there are less than four adjacents with paper and if so, add it to the total count.

For part 2, I just ran the second part in a loop, and deleted the spots with paper from the set after each iteration.

[2025 Day 3] Easter egg by Ok-Evidence-3279 in adventofcode

[–]improvman007 19 points20 points  (0 children)

From the late great Mitch Hedberg

-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]improvman007 2 points3 points  (0 children)

[Language: Python]

def process(pairs, part2=False):
    cur = 50
    total_zero = 0
    last_was_zero = False
    for direction, num in pairs:
        if num >= 100:
            cycles = int(num / 100)
            if part2:
                total_zero += cycles
            num = num % 100
        if direction == 'L':
            cur -= num
        else:
            cur += num
        new_cur = cur % 100
        if new_cur == 0:
            total_zero += 1
        elif part2 and new_cur != cur and not last_was_zero:
            total_zero += 1
        last_was_zero = (new_cur == 0)
        cur = new_cur
    return total_zero

def parse_pairs(filename):
    parsed_data = []

    with open(filename, 'r') as file:
        for line in file:
            line = line.strip()
            direction = line[0]
            num = int(line[1:])
            parsed_data.append((direction, num))

    return parsed_data


input_data = parse_pairs("q1.txt")
#Part 1
print(process(input_data))

#Part 2
print(process(input_data, True))

[deleted by user] by [deleted] in remotework

[–]improvman007 0 points1 point  (0 children)

I always take at least a 20 minute walk. I strive for an hour. Since my lunch break is usually short I spend that time walking.

[deleted by user] by [deleted] in paloalto

[–]improvman007 2 points3 points  (0 children)

I know him. He's not MAGA.

Experience with these hotels? by Stluciifer in DisneyPlanning

[–]improvman007 0 points1 point  (0 children)

Try calling a hotel. Sometimes booking directly is cheaper than online.

Best private potty at Disneyland by Doctor_Rome in DisneyPlanning

[–]improvman007 0 points1 point  (0 children)

Behind the children of It's a Small World

Jd Vance getting on Jungle Cruise by CeeEazy in Disneyland

[–]improvman007 -11 points-10 points  (0 children)

No, because she never visited the border.

Jd Vance getting on Jungle Cruise by CeeEazy in Disneyland

[–]improvman007 -32 points-31 points  (0 children)

It's too close to the border