P1562 Still N-Queens

Description

As the title says, this is the famous $N$-Queens problem.

Input Format

The first line contains an integer $N$. Then follow $N$ lines, each with $N$ characters, describing a board; `*` means placeable, `.` means not placeable.

Output Format

Output the total number of solutions.

Explanation/Hint

$0 < N \le 14$. Translated by ChatGPT 5