Superqueens

A superqueen is a piece of chess that combines the movements of a queen and of a knight. Given an nn, in how many ways can we place nn superqueens on an n×nn \times n board in such a way that no superqueen threatens another superqueen? Here, we are only interested in positions that are really distinct, in the sense that cannot be obtained by rotating or reflecting another position. For instance, for n=10n = 10 there is just one such solution:

Input

Input consists of several cases, each with an nn between 1 and 20.

Output

For every case, print the number of distinct positions.

Problem information

Author: Salvador Roura

Generation: 2026-01-25T10:15:29.267Z

© Jutge.org, 2006–2026.
https://jutge.org