| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 28 | 18 | 16 | 69.565% |
Sudoku puzzles come in all different shapes and difficulty levels. Traditionally a Sudoku puzzle is a 9ドル\times9$ grid. Initially, some of the cells are filled in with numbers and some are empty. The goal is to fill in each cell with a number in the range 1ドル$ -- 9ドル$ subject to the following restrictions:
The difficulty of a Sudoku puzzle can vary widely. The easiest puzzles can be solved with the following two simple techniques:
Consider the partially solved Sudoku puzzle shown in Figure 1. The Single Value Rule applies to grid square A7ドル$ where 8ドル$ is the only value that can be placed there. The Unique Location Rule can be used to put a 5ドル$ in square B3ドル$ as it is the only location in row 3ドル$ where a 5ドル$ can be placed.
Figure 1: Sample Input 1ドル$
The easiest Sudoku puzzles can be solved with only these two rules; harder puzzles use techniques like swordfish, x-wings and BUGs.
For this problem you will be given a Sudoku puzzle and must determine if it is an easy puzzle, i.e., whether it can be solved by just using the Single Value and Unique Location rules.
Input consists of a single Sudoku puzzle given over nine lines. Each line contains 9ドル$ values in the range 0ドル$ to 9ドル,ドル where a 0ドル$ indicates a blank in the puzzle.
Output the word Easy followed by the solved Sudoku puzzle if it is an easy puzzle. The puzzle should be printed on nine lines with a single space separating values on a line. If the puzzle is not easy output Not easy followed by as much of the Sudoku puzzle as can be solved using the two rules described above. Use the same format for the partial solution as for the complete solution using a '.' instead of a digit for a unfilled square.
2 6 0 5 1 0 3 0 0 3 0 0 0 6 0 0 0 2 0 1 5 0 7 3 9 0 4 0 0 9 0 0 0 5 0 0 0 0 2 6 0 1 4 0 0 0 0 6 0 0 0 7 0 0 6 0 1 9 4 0 2 3 0 9 0 0 0 2 0 0 0 5 0 0 8 0 3 5 0 4 9
Easy 2 6 4 5 1 9 3 7 8 3 9 7 8 6 4 1 5 2 8 1 5 2 7 3 9 6 4 1 3 9 4 8 7 5 2 6 5 7 2 6 9 1 4 8 3 4 8 6 3 5 2 7 9 1 6 5 1 9 4 8 2 3 7 9 4 3 7 2 6 8 1 5 7 2 8 1 3 5 6 4 9
0 0 0 0 0 0 7 0 1 0 0 0 0 0 1 2 3 5 0 0 1 8 0 0 0 0 6 0 0 0 0 2 5 0 9 3 9 0 0 0 0 0 0 0 2 3 1 0 6 7 0 0 0 0 2 0 0 0 0 3 8 0 0 1 3 8 9 0 0 0 0 0 4 0 6 0 0 0 0 0 0
Not easy . . 3 . . . 7 8 1 . . . . . 1 2 3 5 . . 1 8 3 . 9 4 6 . . . . 2 5 . 9 3 9 . . 3 . . . 7 2 3 1 2 6 7 9 4 5 8 2 . . . . 3 8 . . 1 3 8 9 . . 5 . . 4 . 6 . . . 3 . .
ICPC > Regionals > North America > East Central North America Regional > 2020 East Central Regional Contest J번