Nawabari

Nawabari (Territory) is a Japanese logic puzzle where the goal is to divide the grid into rectangles, each containing one of the given numbers.

Nawabari

Rules: The grid must be divided into rectangles along the grid lines.
Each rectangle contains exactly one cell with a number that indicates how many of the four sides of that cell a rectangle boundary passes through, where the edge of the grid is also considered a rectangle boundary.