Have you ever heard the game called "suduku"?
Yeah, it's a game played on a 9 x 9 board with number 1 to 9.
But 残念です, the game that we will talk is called "kukuku".
"kukuku" is played on 4 x 4 board with number 1 to 4.
The board is partite by 4 big blocks and each big block is partite by 4 small blocks -- There are totally 16 small blocks.
By the Game Rule, you have to put the number between 1 and 4 in each small block,
you must assume each number appears exactly one time in each of rows,columns and big blocks.
NOW, you have a board that some number is already put on it, please count how many ways to solve it, and output the alphabetically first solution.
is better than
If you solve this problem, you can say "KUKUKU" and have a nice day!!
There is four rows, and each row has four number,
the numbers means the numbers that are put on the small block already.
If the number is 0, it means the block is empty now, you should put the number on it.
Please count how many ways to solve it, and output the alphabetically first solution like Sample Output.
And if there is no way to solve it, please output the message "I can not solve!!"(no double quotation marks)
|No.||Time Limit (ms)||Memory Limit (KiB)||Output Limit (KiB)||Subtasks|