Nikoli the Farmer has decided to remodel his two 9×9 livestock pens, but something
unfortunate has happened. His high-tech Troughmaster automated feeding systems have been
accidentally pre-installed at various locations from which he cannot move them. Therefore he
must instead find a way to put animals in the stalls leaving the Troughmasters where they are.
The systems work as follows:
*different*
enclosures (i.e., with an enclosure wall between them) contain consecutive numbers of animals,
the enclosure wall between those two stalls needs to be reinforced.

Note the following properties of the solution:

- The location of each Troughmaster is shown by a number in the grid, indicating the number of animals that machine can feed.
- Each of the two pens must be partitioned into a number of rectangular enclosures, in such a way that each enclosure contains exactly one Troughmaster, and exactly the number of animals the Troughmaster requires.
- Each of the 81 stalls in the grid (including the ones where the Troughmasters are located) must contain some integer number of animals between 1 and 9.
- Each row and column of each grid must include stalls with all nine different numbers of animals. (Shikakuro Farm was formerly known as Sudoku Farm before Farmer Nikoli diversified his production.)
- Within each rectangular enclosure, no two stalls may contain the same number of animals.
- Indeed, within a given enclosure, no two
**adjacent**stalls may even contain**consecutive**numbers of animals (or else the two groups of animals may quarrel with each other). For instance, if one stall has 5 animals in it, no horizontally or vertically adjacent stall**within the same enclosure**may contain exactly 4 or exactly 6 animals.

See below for a sample grid and its solution.

Sample puzzle grid: |
Solution to sample puzzle: |

- The Latin-square constraint is satisfied: each digit appears exactly once in each row and column.
- Each enclosure in the solution grid contains (the location of) exactly one of the clue numbers in the puzzle grid.
- No digit appears more than once in any enclosure.
- The sum of the digits in any enclosure in the solution is equal to the corresponding clue number.
- Two
*consecutive*digits*within the same enclosure*are never horizontally or vertically*adjacent*to each other (but consecutive digits may be adjacent on opposite sides of an enclosure wall).