Tight-Fit Soduku

From programming_contest
Jump to navigation Jump to search

This problem effectively asks you to solve sudoku, but with the twist that when a box is reduced to 2 possible outcomes, the box is "solved."

It is hard to know exactly how much optimization is needed to solve this problem, but it is likely that

  1. storing the possible values for each group, row, and column, along with the possible values for any given box, and propagating across the 4 any time anything changes
  2. brute force search against the remaining possibilities, applying step 1

is sufficient.

There are other techniques which can be applied, such as, if only 2 possible numbers for a given, say, row, occur in the same group, then they can't possibly be in any other place in that row or group, but likely are not needed here.