QQueenVellum
Product

Product features · Bounded queen placements

01

Follow placements row by row and distinguish an empty-board solution from a board size with no valid placements.

01

Connection

Base URL, credentials and a reachable server.

02

Selection

A model available through the configured endpoint.

03

Capabilities

Context limits and tool support are determined by the model and server.

Bounded queen placements

● ● ●QueenVellum●
A concrete starting point · Bounded queen placements ×
def queens(size):
    if type(size) is not int or not 0 <= size <= 8:
        raise ValueError("size.range")
    result = []
    def visit(columns, down, up):
        row = len(columns)
        if row == size:
            result.append(tuple(columns))
            return
        for column in range(size):
            if column not in columns and row-column not in down and row+column not in up:
                visit(columns + [column], down | {row-column}, up | {row+column})
    visit([], set(), set())
    return result
✳Enumerate nonattacking queen placements on boards of size zero through eight.
✓ ChangesReview before applying ↗
Illustrative workspace
AI coding workspace

Your next change starts here.

Get the Windows app ↗