| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 (추가 시간 없음) | 512 MB | 8 | 2 | 2 | 25.000% |
Alice has a rectangular table consisting of $n \times m$ squares. Some squares are empty, and other are filled with integers.
Alice thinks that a table is beautiful if:
Alice want to check if she can put numbers (not necessary integers) in all empty squares to make her table beautiful. Also, if she can, she is interested if there is an unique way to do it.
The first line contains two integers $n$ and $m$ (1ドル \le n, m \le 10$). The next $n$ lines describe of the table. Each of these lines contains $m$ tokens separated by spaces. Each token is either "?" if the respective square is empty, or the respective number if it is filled.
All the given numbers are integers not greater than 100ドル$ by absolute value. However, there are no such constraints on the numbers which Alice can put in empty cells.
If there is no way to make the table beautiful, print the only word "None".
If there is an unique way to make the table beautiful, print the word "Unique" on the first line, and then $n$ lines containing the table after filling all empty squares.
3 5 1 2 3 ? ? ? 5 ? ? ? ? ? ? 0 ?
Unique 1/1 2/1 3/1 4/1 5/1 13/2 5/1 7/2 2/1 1/2 12/1 8/1 4/1 0/1 -4/1
3 3 1 2 3 7 ? 4 ? 6 5
None
2 2 1 2 ? 4
Multiple 1/1 2/1 3/1 4/1 and 1/1 2/1 2/1 4/1