The task is as follows: The fields of a special-shaped sudoku are described below: 6 6 8 8 8 8 8 8 8 6 6 2 2 2 8 2 3 8 6 6 6 6 2 2 2 3 3 6 5 5 1 2 2 1 3 3 5 5 1 1 1 1 1 3 3 5 5 1 7 7 1 3 3 4 5 5 7 7 7 4 4 4 4 9 5 7 9 7 7 7 4 4 9 9 9 9 9 9 9 4 4 The same numbers represent one area. We need to randomly generate a sudoku where the numbers (1-9) in each row and column are unique. In addition, uniqueness must also be guaranteed in each area (described by the previous array). We can't bring special-shaped sudokus to Vint before we create an algorithm that generates this sudoku in about 100 ms. Maybe there is a programming enthusiast among Vint users who can solve this problem. The person who solves the problem will receive honor, fame and other rewards (free VIP status, etc.). NB! The algorithm must be able to generate a correct problem for each special-shaped sudoku (described here: http://www.vint.ee/uploads/erikujuline.txt) in less than 100 ms.
Small Programming Challenge (Special Shaped Sudokus)
Lu par 91 utilisateurs
I think this still requires an IT specialist with ten years of experience.
[i]posted by kraska[/i] I think that this still requires an IT specialist with ten years of experience.
No. Tiit, for example, studied Pascal for a few years in high school. At one point, he picked up and developed a Sudoku evaluator in Java. a method that takes an unsolved Sudoku as input and tells how difficult it is to solve (the easy/medium/hard system used in Vind today). To solve this task, you need primitive knowledge of programming (while and if mainly). The most difficult thing is to come up with an algorithm - you can win many times over by correctly combining data structures, while loops, etc. With the right algorithm, you can win in time by orders of magnitude.
I wonder if this example is even slightly in the right direction? 11115555 11225255 37773375 84474479 81144666 98448446 37557775 22328899 22229999
You don't have unique numbers in each row like sudoku requires :)
Now it should be unique, mirrored, entropic, negative. At least that's what it seemed like from the example. One criterion was missing. All numbers must be nine. And one line was missing from the solution:) 111185555 117115255 177733375 374764476 666474333 384448486 286668889 223299899 222259999
You must have misunderstood the task: The goal is to create a completed special-shaped sudoku, based on the description of the special-shaped sudoku (which was included in the first post)
Indeed, I was probably trying to understand, as a layman, the description of sudoku, in computer language. It would be helpful to see the description and sudoku side by side. This would help to understand the meaning of one number line, when describing sudoku or a part of it. The sequence of numbers in the example is like this: {1,1,1,1,1,1,2,2,2,2}, {1,1,3,3,4,5,5,2,2}, {1,3,3,4,4,4,5,5,2}, {1,3,4,4,4,5,5,2}, {1,3,4,4,4,4,5,2}, {8,3,6,6,6,6,6,5,2}, {8,3,3,6,6,6,5,5,9}, {8,3,7,7,6,7,7,5,9}, {8,8,7,7,7,7,7,9,9}, {8,8,8,8,9,9,9,9,9}}; I probably tried to write a description of another sudoku, so that the numbers in each row and column would be unique. In addition, so that uniqueness would be guaranteed in each area (described by the previous array). There is a unique system and similarity here. The array and meaning are probably incomplete:) But the idea itself did not seem stupid because there are many different sudokus. Therefore, one could assume that the descriptions would also be probably many different. And the result was something like this: (1,1,1,5,2,5,9,9,9) (1,1,6,3,7,3,6,9,9) (1,8,8,8,7,4,4,4,9) (5,6,6,6,7,2,3,3,2) (2,2,2,7,7,7,5,5,5) (5,6,6,5,7,3,3,2) (4,9,9,9,7,1,1,1,8) (4,4,6,3,7,3,6,8,8) (4,4,4,2,5,2,8,8,8)); 626171848 262717484 626171848 595737959 959373595 595737959 484313262 848131626 484313262 And as I now understand, the goal is not to create a special-shaped sudoku or a description that already exists, but to create a program for an existing sudoku (description) that reads it so that the information fed to the computer can be displayed as a visual sudoku more quickly.
The first line of the example you provided is: (1,1,1,5,2,5,9,9,9) Not all the numbers (1-9) in that line are unique!
So maybe he's similar to the bottom row?!