Small Programming Challenge (Special Shaped Sudokus)

91 хэрэглэгч унших

Krubi2 2012-04-25T17:23:03+03:00
Each row ********* must contain the numbers 1-9 (each can only occur once in each row, for example: 329158674. Each column * * * * * * * * * must contain the numbers 1-9 (each can only occur once in each column, for example: 4 5 6 3 9 8 2 1 7 Also, each special-shaped cell must contain 1-9 only once. Example 1: ******* ** 3254689 17 Example 2: * * **** *** 3 2 5867 914 I assume that I explained things correctly.
Mask 2012-04-25T19:43:32+03:00
Impossible. If each row can contain one number once, then the result will be something like this and absolutely not similar to the example. 123456789 912345678 891234567 789123456 678912345 567891234 456789123 345678912 234567891





Krubi2 2012-04-25T20:19:58+03:00
The idea is that in each row and column there is one of each kind. And in addition to that, there would also be different numbers 1-9 in the marked sectors (so that no number is repeated). Instead of the regular Sudoku (9x9) having nine 3x3 "sectors" where the numbers 1-9 must be there (so that none of them are repeated in that sector), the special-shaped ones have sectors of special shapes where the numbers 1-9 must also be there (so that none of them are repeated in that sector).
Mask 2012-04-25T20:34:24+03:00
Or should the same numbers in the example be replaced with numbers from one to nine. So that the same numbers do not overlap in a row and the virus?!

Mask 2012-04-26T07:03:17+03:00
Yeah. Good point. The solution is only possible if you do both tables at the same time and match them. Most of the variants have one to five holes left in them. But there is one. It seems to at least meet the conditions. Up, down, left, right and 9 shapes with a difference of 2 2 2 2 1. So five different ones. 5 5 5 5 7 4 4 4 4 5 5 5 5 7 7 7 3 4 5 7 7 7 7 3 3 4 1 9 9 9 9 3 3 3 4 1 8 8 8 9 3 3 3 4 1 8 8 8 9 9 9 4 1 8 8 6 6 6 6 6 2 1 8 6 6 6 2 2 2 2 1 1 1 1 6 2 2 2 2 begin writeln (1,2,4,3,5,6,9,8,7) (8,6,7,9,1,2,4,5,3) (5,3,9,7,6,8,2,4,1) (9,1,5,4,8,3,6,7,2) (3,7,6,5,2,1,8,9,4) (4,8,2,1,7,9,3,6,5) (6,9,3,2,4,7,5,1,8) (7,4,8,6,3,5,1,2,9) (2,5,1,8,9,4,7,3,6)); yourself.
figaro 2012-04-26T10:18:27+03:00
The mask seems to be a tough boy.....
Mask 2012-04-26T12:17:56+03:00
One of the proposed blanks was also successfully completed. {1,1,1,2,2,2,2,2,3}, (7,9,2,3,8,1,4,6,5) {1,1,1,1,2,2,2,3,3}, (1,4,3,8,2,5,7,9,6) {4,4,1,1,5,2,3,3,3}, (2,3,6,5,1,9,8,4,7) {4,4,4,5,5,5,6,3,3}, (8,5,9,4,7,2,6,1,3) {7,4,4,4,5,6,6,6,3}, (5,6,4,1,3,7,9,8,2) {7,7,4,5,5,5,6,6,6}, (4,2,7,6,9,8,5,3,1) {7,7,7,8,5,9,9,6,6}, (9,8,1,7,5,6,3,2,4) {7,7,8,8,8,9,9,9,9}, (3,7,8,2,6,4,1,5,9) {7,8,8,8,8,9,9,9}}; (6,1,5,9,4,3,2,7,8)); I noticed that when starting to create shapes with Special Shapes, you should keep in mind that no more than three shape areas should fall on one line. In some places there can be four, but this significantly reduces the percentage of uniqueness success. Probably also different cavemen later.
Mask 2012-04-26T23:55:39+03:00
111132222 1 2 4 3 9 7 8 5 6 111333222 9 5 7 4 8 6 2 1 3 113333322 8 6 3 2 7 1 5 9 4 445555566 3 4 1 9 2 8 7 6 5 445556666 2 1 6 5 4 3 9 7 8 444456669 5 9 8 6 3 4 1 2 7 477789999 7 8 2 1 6 5 4 3 9 777888999 4 3 5 7 1 9 6 8 2 777888889 6 7 9 8 5 2 3 4 1
driv4r 2012-04-27T00:16:43+03:00
No programming is required, instead Mask simply creates thousands of uniquely shaped sudokus that are generated :D
Mask 2012-04-27T03:19:23+03:00
{1,1,1,1,1,2,2,2,3}, 5,9,3,1,8,2,6,4,7 {4,1,1,1,2,2,2,2,3}, 9,4,6,2,3,8,1,7,5 {4,1,5,5,6,2,7,2,3}, 6,7,8,3,1,9,2,5,4 {4,5,5,5,6,6,7,7,3}, 3,6,7,9,2,5,4,1,8 {4,4,5,6,6,6,7,3,3}, 1,5,4,7,6,3,8,2,9 {4,5,5,6,6,7,7,7,3}, 2,1,5,8,4,7,3,9,6 {4,8,5,8,6,7,7,9,3}, 7,8,2,4,9,6,5,3,1 {4,8,8,8,9,9,9,3}, 8,2,1,5,7,4,9,6,3 {4,8,8,9,9,9,9,9,9}}; 4,3,9,6,5,1,7,8,2 One of the hardest. It would be easier to make new ones with small changes from unique ones, until the changes are large. By moving the shapes one square. From zero to unique ones, that is relatively time-consuming. What if there is some special one?!

Постод хариулах

This functionality is only for verified or VIP users