Skip to content

Instantly share code, notes, and snippets.

View Joker-vD's full-sized avatar
🥄

Joker-vD

🥄
View GitHub Profile
@Joker-vD
Joker-vD / linkedinqueens.py
Last active June 20, 2025 19:33 — forked from hwayne/linkedinqueens.py
LI queens in z3
# Associated newsletter: https://buttondown.com/hillelwayne/archive/solving-linkedin-queens-with-smt/
# See also: https://ryanberger.me/posts/queens/
# And: https://github.com/ryan-berger/queens/blob/master/main.py
from z3 import * # type: ignore
from itertools import combinations, chain, product
solver = Solver()
size = 9
# queens[n] = col of queen on row n