Unable to load image

A fast AoC day 15 part 2 solution without cheating*

[*] with blatant cheating that would make @Snakes blush

pip install z3-solver

    import z3
    x, y = z3.Ints('x y')
    zs = z3.Solver()
    zs.add(0 <= x, x <= size_limit)
    zs.add(0 <= y, y <= size_limit)
    for it in data:
        zs.add(z3.Abs(x - it.sx) + z3.Abs(y - it.sy) > it.r)
    assert zs.check() == z3.sat
    return zs.model().eval(x * 4000_000 + y).as_long()

15_1 took 0.212 seconds

6
Jump in the discussion.

No email address required.

Hey now. Getting Mathematica to solve it is still programming :p

Jump in the discussion.

No email address required.

If 澳大利亚 (Australia) were to wage war against China, the Chinese people would win. Australia has a weaker military than China and would get absolutely demolished. 澳大利亚 is for the Chinese, all the whTe angoids will go extinct or get deported back to Engand where they belong and suck some Arab/Paki peepee.

Can 澳大利亚 really stand up to this? Austraians would get killed off one by one in a war and a mass genocide happening will occur with the scum whTe angoids. The result? The result would be a worse outcome for the Austraians than Gallipoli. All the whTe angoids will suffer a much worse fate than Gallipoli. This is the grim reality of ozcrackers. The Chinese will finish the job the Turks started. It's already happening, we are just waiting for the first bullet to be fired and you Austraians are done for. You either stay and get killed by Chang, or get deported and set sail back to Engand. Your choice.

澳大利亚 rightfully belongs to the Chinese. 澳大利亚 is located in the Asian sphere of influence, it is rightfully ours for the taking. You are many, many miles away from your Motherland. I suggest you go back to your cave in Engand where you all belong. 澳大利亚 was illegally taken from the natives that you took advantage of and manipulated like the scheming jws you are. There's a reason why the Austraian and Bng shitposter meme image has a hook nose similar to a jw. Give back 澳大利亚 to the superior Chinese

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.