Skip to content

Usoone

Difficulty: 🟡 Medium | Tags: connectivity regional shading

📖 Rule Reference: Read full rules on external site


Input Format

First line: rows cols Next rows lines: puzzle grid ('-' for empty, digits for clues) Next rows lines: region grid (region identifiers)

Output Format

Grid with 'x' for shaded cells and '-' for unshaded cells

Examples

Python Quick Start

Use the following code to solve this puzzle directly:

import puzzlekit

# Raw input data
problem_str = """
8 8
1 2 - - - - 1 -
- - 1 1 - 3 2 -
- - - 0 - 2 - 1
0 2 - - - - 2 0
2 1 - - - 1 0 -
0 - - 0 - 0 0 -
- 2 0 - 3 1 - 1
- - 0 2 - 1 1 -
1 1 1 6 6 6 6 14
1 1 1 6 6 6 6 14
1 1 1 6 6 6 6 14
2 2 2 2 2 2 10 10
2 2 2 2 2 2 11 11
3 3 4 7 8 8 12 12
3 3 4 7 9 9 9 9
3 3 5 5 5 5 13 13
"""

# Solve
res = puzzlekit.solve(problem_str, puzzle_type="usoone")

# Print solution grid
print(res.solution_data.get('solution_grid', []))

# Visualize (optional)
res.show()

Solution Output

8 8
- - x - - x - -
x - - - x - - x
- x - - - - x -
- - x - - x - -
- - - - - - - x
- x - - x - - -
- - - x - - x -
- x - - x - - x