powered by simpleCommunicator - 2.0.49     © 2025 Programmizd 02
Форумы / IBM DB2, WebSphere, IMS, U2 [игнор отключен] [закрыт для гостей] / Версия Терминатора ( DB2-Всемогущий )
16 сообщений из 41, страница 2 из 2
Версия Терминатора ( DB2-Всемогущий )
    #36321366
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
11/19/09: From 3 Newspaper (Very Hard, but very FAST):

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
Source (line, sudoku_str) as
(
select  1 , '082050000'
  from sysibm.sysdummy1
union all
select  2 , '030047096'
  from sysibm.sysdummy1
union all
select  3 , '000100002'
  from sysibm.sysdummy1
union all
select  4 , '090000300'
  from sysibm.sysdummy1
union all
select  5 , '520000041'
  from sysibm.sysdummy1
union all
select  6 , '003000020'
  from sysibm.sysdummy1
union all
select  7 , '300009000'
  from sysibm.sysdummy1
union all
select  8 , '450630070'
  from sysibm.sysdummy1
union all
select  9 , '000070910'
  from sysibm.sysdummy1
) 

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
Line  1 :    |  7  |  8  |  2  |  9  |  5  |  6  |  1  |  3  |  4  |
Line  2 :    |  1  |  3  |  5  |  2  |  4  |  7  |  8  |  9  |  6  |
Line  3 :    |  9  |  4  |  6  |  1  |  8  |  3  |  7  |  5  |  2  |
Line  4 :    |  6  |  9  |  4  |  5  |  1  |  2  |  3  |  8  |  7  |
Line  5 :    |  5  |  2  |  7  |  3  |  9  |  8  |  6  |  4  |  1  |
Line  6 :    |  8  |  1  |  3  |  7  |  6  |  4  |  5  |  2  |  9  |
Line  7 :    |  3  |  7  |  1  |  8  |  2  |  9  |  4  |  6  |  5  |
Line  8 :    |  4  |  5  |  9  |  6  |  3  |  1  |  2  |  7  |  8  |
Line  9 :    |  2  |  6  |  8  |  4  |  7  |  5  |  9  |  1  |  3  | 

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
Source (line, sudoku_str) as
(
select  1 , '498000500'
  from sysibm.sysdummy1
union all
select  2 , '700086001'
  from sysibm.sysdummy1
union all
select  3 , '000000000'
  from sysibm.sysdummy1
union all
select  4 , '009021800'
  from sysibm.sysdummy1
union all
select  5 , '000000000'
  from sysibm.sysdummy1
union all
select  6 , '005460700'
  from sysibm.sysdummy1
union all
select  7 , '000000000'
  from sysibm.sysdummy1
union all
select  8 , '600970304'
  from sysibm.sysdummy1
union all
select  9 , '500000027'
  from sysibm.sysdummy1
) 

Line 1: | 4 | 9 | 8 | 2 | 1 | 7 | 5 | 6 | 3 |
Line 2: | 7 | 2 | 3 | 5 | 8 | 6 | 4 | 9 | 1 |
Line 3: | 1 | 5 | 6 | 3 | 9 | 4 | 2 | 7 | 8 |
Line 4: | 3 | 4 | 9 | 7 | 2 | 1 | 8 | 5 | 6 |
Line 5: | 2 | 6 | 7 | 8 | 5 | 3 | 1 | 4 | 9 |
Line 6: | 8 | 1 | 5 | 4 | 6 | 9 | 7 | 3 | 2 |
Line 7: | 9 | 7 | 4 | 1 | 3 | 2 | 6 | 8 | 5 |
Line 8: | 6 | 8 | 2 | 9 | 7 | 5 | 3 | 1 | 4 |
Line 9: | 5 | 3 | 1 | 6 | 4 | 8 | 9 | 2 | 7 |

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
Source (line, sudoku_str) as
(
select  1 , '200090000'
  from sysibm.sysdummy1
union all
select  2 , '080203100'
  from sysibm.sysdummy1
union all
select  3 , '301400205'
  from sysibm.sysdummy1
union all
select  4 , '450000800'
  from sysibm.sysdummy1
union all
select  5 , '900000004'
  from sysibm.sysdummy1
union all
select  6 , '002000053'
  from sysibm.sysdummy1
union all
select  7 , '108007602'
  from sysibm.sysdummy1
union all
select  8 , '009802070'
  from sysibm.sysdummy1
union all
select  9 , '000040008'
  from sysibm.sysdummy1
) 

Line 1: | 2 | 6 | 5 | 1 | 9 | 8 | 3 | 4 | 7 |
Line 2: | 7 | 8 | 4 | 2 | 5 | 3 | 1 | 6 | 9 |
Line 3: | 3 | 9 | 1 | 4 | 7 | 6 | 2 | 8 | 5 |
Line 4: | 4 | 5 | 3 | 7 | 2 | 9 | 8 | 1 | 6 |
Line 5: | 9 | 1 | 6 | 3 | 8 | 5 | 7 | 2 | 4 |
Line 6: | 8 | 7 | 2 | 6 | 1 | 4 | 9 | 5 | 3 |
Line 7: | 1 | 4 | 8 | 5 | 3 | 7 | 6 | 9 | 2 |
Line 8: | 5 | 3 | 9 | 8 | 6 | 2 | 4 | 7 | 1 |
Line 9: | 6 | 2 | 7 | 9 | 4 | 1 | 5 | 3 | 8 |

Lenny
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36336365
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
ThanksGiving Sudokus && New Version of XHard Solver

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
Source (line, sudoku_str) as 
(
select 1, '100086000'
  from sysibm.sysdummy1
union all
select 2, '090201030'
  from sysibm.sysdummy1
union all
select 3, '680000000'
  from sysibm.sysdummy1
union all 
select 4, '008000900'
  from sysibm.sysdummy1
union all
select 5, '000875000'
  from sysibm.sysdummy1
union all
select 6, '004000100'
  from sysibm.sysdummy1
union all
select 7, '000300018'
  from sysibm.sysdummy1
union all
select 8, '070104020'
  from sysibm.sysdummy1
union all
select 9, '000020003'
  from sysibm.sysdummy1
)

авторLine 1: | 1 | 3 | 2 | 9 | 8 | 6 | 7 | 4 | 5 |
Line 2: | 4 | 9 | 7 | 2 | 5 | 1 | 8 | 3 | 6 |
Line 3: | 6 | 8 | 5 | 7 | 4 | 3 | 2 | 9 | 1 |
Line 4: | 3 | 6 | 8 | 4 | 1 | 2 | 9 | 5 | 7 |
Line 5: | 2 | 1 | 9 | 8 | 7 | 5 | 3 | 6 | 4 |
Line 6: | 7 | 5 | 4 | 6 | 3 | 9 | 1 | 8 | 2 |
Line 7: | 5 | 2 | 6 | 3 | 9 | 7 | 4 | 1 | 8 |
Line 8: | 8 | 7 | 3 | 1 | 6 | 4 | 5 | 2 | 9 |
Line 9: | 9 | 4 | 1 | 5 | 2 | 8 | 6 | 7 | 3 |

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
Source (line, sudoku_str) as 
(
select 1, '670200000'
  from sysibm.sysdummy1
union all
select 2, '204036070'
  from sysibm.sysdummy1
union all
select 3, '005400000'
  from sysibm.sysdummy1
union all 
select 4, '080000046'
  from sysibm.sysdummy1
union all
select 5, '007104800'
  from sysibm.sysdummy1
union all
select 6, '410000050'
  from sysibm.sysdummy1
union all
select 7, '000003400'
  from sysibm.sysdummy1
union all
select 8, '040910605'
  from sysibm.sysdummy1
union all
select 9, '000002039'
  from sysibm.sysdummy1
)

авторLine 1: | 6 | 7 | 1 | 2 | 9 | 5 | 3 | 8 | 4 |
Line 2: | 2 | 9 | 4 | 8 | 3 | 6 | 5 | 7 | 1 |
Line 3: | 8 | 3 | 5 | 4 | 7 | 1 | 9 | 6 | 2 |
Line 4: | 3 | 8 | 9 | 5 | 2 | 7 | 1 | 4 | 6 |
Line 5: | 5 | 2 | 7 | 1 | 6 | 4 | 8 | 9 | 3 |
Line 6: | 4 | 1 | 6 | 3 | 8 | 9 | 2 | 5 | 7 |
Line 7: | 9 | 6 | 2 | 7 | 5 | 3 | 4 | 1 | 8 |
Line 8: | 7 | 4 | 3 | 9 | 1 | 8 | 6 | 2 | 5 |
Line 9: | 1 | 5 | 8 | 6 | 4 | 2 | 7 | 3 | 9 |

Lenny
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36350044
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
3 Sudoku: Very hard + Level-3 + Level-4: total time = 5 seconds:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
Source (line, sudoku_str) as 
(
select  1 , '000680790'
  from sysibm.sysdummy1
union all
select  2 , '076009000'
  from sysibm.sysdummy1
union all
select  3 , '030002804'
  from sysibm.sysdummy1
union all 
select  4 , '020000040'
  from sysibm.sysdummy1
union all 
select  5 , '501000203'
  from sysibm.sysdummy1
union all
select  6 , '080000010'
  from sysibm.sysdummy1
union all
select  7 , '408300050'
  from sysibm.sysdummy1
union all
select  8 , '000800470'
  from sysibm.sysdummy1
union all
select  9 , '017045000'
  from sysibm.sysdummy1
)

Line 1: | 2 | 4 | 5 | 6 | 8 | 3 | 7 | 9 | 1 |
Line 2: | 8 | 7 | 6 | 4 | 1 | 9 | 5 | 3 | 2 |
Line 3: | 1 | 3 | 9 | 5 | 7 | 2 | 8 | 6 | 4 |
Line 4: | 9 | 2 | 3 | 1 | 5 | 8 | 6 | 4 | 7 |
Line 5: | 5 | 6 | 1 | 7 | 9 | 4 | 2 | 8 | 3 |
Line 6: | 7 | 8 | 4 | 2 | 3 | 6 | 9 | 1 | 5 |
Line 7: | 4 | 9 | 8 | 3 | 2 | 7 | 1 | 5 | 6 |
Line 8: | 3 | 5 | 2 | 8 | 6 | 1 | 4 | 7 | 9 |
Line 9: | 6 | 1 | 7 | 9 | 4 | 5 | 3 | 2 | 8 |

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
Source (line, sudoku_str) as 
(
select  1 , '700020003'
  from sysibm.sysdummy1
union all
select  2 , '020467090'
  from sysibm.sysdummy1
union all
select  3 , '000000800'
  from sysibm.sysdummy1
union all 
select  4 , '004000002'
  from sysibm.sysdummy1
union all 
select  5 , '000090000'
  from sysibm.sysdummy1
union all
select  6 , '200003600'
  from sysibm.sysdummy1
union all
select  7 , '003000000'
  from sysibm.sysdummy1
union all
select  8 , '080719030'
  from sysibm.sysdummy1
union all
select  9 , '602030001'
  from sysibm.sysdummy1
)

Line 1: | 7 | 5 | 1 | 9 | 2 | 8 | 4 | 6 | 3 |
Line 2: | 3 | 2 | 8 | 4 | 6 | 7 | 1 | 9 | 5 |
Line 3: | 9 | 4 | 6 | 3 | 5 | 1 | 8 | 2 | 7 |
Line 4: | 8 | 3 | 4 | 1 | 7 | 6 | 9 | 5 | 2 |
Line 5: | 5 | 6 | 7 | 2 | 9 | 4 | 3 | 1 | 8 |
Line 6: | 2 | 1 | 9 | 5 | 8 | 3 | 6 | 7 | 4 |
Line 7: | 1 | 7 | 3 | 6 | 4 | 2 | 5 | 8 | 9 |
Line 8: | 4 | 8 | 5 | 7 | 1 | 9 | 2 | 3 | 6 |
Line 9: | 6 | 9 | 2 | 8 | 3 | 5 | 7 | 4 | 1 |

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
Source (line, sudoku_str) as 
(
select  1 , '000000000'
  from sysibm.sysdummy1
union all
select  2 , '703100065'
  from sysibm.sysdummy1
union all
select  3 , '010689000'
  from sysibm.sysdummy1
union all 
select  4 , '008002700'
  from sysibm.sysdummy1
union all 
select  5 , '250000083'
  from sysibm.sysdummy1
union all
select  6 , '006400000'
  from sysibm.sysdummy1
union all
select  7 , '000346070'
  from sysibm.sysdummy1
union all
select  8 , '300000501'
  from sysibm.sysdummy1
union all
select  9 , '000000000'
  from sysibm.sysdummy1
)

Line 1: | 6 | 2 | 9 | 7 | 5 | 3 | 8 | 1 | 4 |
Line 2: | 7 | 8 | 3 | 1 | 2 | 4 | 9 | 6 | 5 |
Line 3: | 4 | 1 | 5 | 6 | 8 | 9 | 3 | 2 | 7 |
Line 4: | 1 | 4 | 8 | 5 | 3 | 2 | 7 | 9 | 6 |
Line 5: | 2 | 5 | 7 | 9 | 6 | 1 | 4 | 8 | 3 |
Line 6: | 9 | 3 | 6 | 4 | 7 | 8 | 1 | 5 | 2 |
Line 7: | 5 | 9 | 1 | 3 | 4 | 6 | 2 | 7 | 8 |
Line 8: | 3 | 6 | 2 | 8 | 9 | 7 | 5 | 4 | 1 |
Line 9: | 8 | 7 | 4 | 2 | 1 | 5 | 6 | 3 | 9 |

Lenny
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36360849
Lkhiger,
Добрвй день,
а вот такой решит http://sudoku.org.ua/rus/ на уровне "Минимально"?
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36361294
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Where you can find Sudoku Solver which could bring to you 5 (or any number) first sudokus and 5 (or any number) last sudokus ?

авторLine 1: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Line 2: | 4 | 5 | 6 | 7 | 8 | 9 | 1 | 2 | 3 |
Line 3: | 7 | 8 | 9 | 1 | 2 | 3 | 4 | 5 | 6 |
Line 4: | 2 | 1 | 4 | 3 | 6 | 5 | 8 | 9 | 7 |
Line 5: | 3 | 6 | 5 | 8 | 9 | 7 | 2 | 1 | 4 |
Line 6: | 8 | 9 | 7 | 2 | 1 | 4 | 3 | 6 | 5 |
Line 7: | 5 | 3 | 1 | 6 | 4 | 2 | 9 | 7 | 8 |
Line 8: | 6 | 4 | 2 | 9 | 7 | 8 | 5 | 3 | 1 |
Line 9: | 9 | 7 | 8 | 5 | 3 | 1 | 6 | 4 | 2 |

Line 1: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Line 2: | 4 | 5 | 6 | 7 | 8 | 9 | 1 | 2 | 3 |
Line 3: | 7 | 8 | 9 | 1 | 2 | 3 | 4 | 5 | 6 |
Line 4: | 2 | 1 | 4 | 3 | 6 | 5 | 8 | 9 | 7 |
Line 5: | 3 | 6 | 5 | 8 | 9 | 7 | 2 | 1 | 4 |
Line 6: | 8 | 9 | 7 | 2 | 1 | 4 | 3 | 6 | 5 |
Line 7: | 5 | 3 | 1 | 6 | 4 | 2 | 9 | 7 | 8 |
Line 8: | 6 | 4 | 8 | 9 | 7 | 1 | 5 | 3 | 2 |
Line 9: | 9 | 7 | 2 | 5 | 3 | 8 | 6 | 4 | 1 |

Line 1: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Line 2: | 4 | 5 | 6 | 7 | 8 | 9 | 1 | 2 | 3 |
Line 3: | 7 | 8 | 9 | 1 | 2 | 3 | 4 | 5 | 6 |
Line 4: | 2 | 1 | 4 | 3 | 6 | 5 | 8 | 9 | 7 |
Line 5: | 3 | 6 | 5 | 8 | 9 | 7 | 2 | 1 | 4 |
Line 6: | 8 | 9 | 7 | 2 | 1 | 4 | 3 | 6 | 5 |
Line 7: | 5 | 3 | 1 | 6 | 4 | 2 | 9 | 7 | 8 |
Line 8: | 6 | 7 | 2 | 9 | 3 | 8 | 5 | 4 | 1 |
Line 9: | 9 | 4 | 8 | 5 | 7 | 1 | 6 | 3 | 2 |

Line 1: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Line 2: | 4 | 5 | 6 | 7 | 8 | 9 | 1 | 2 | 3 |
Line 3: | 7 | 8 | 9 | 1 | 2 | 3 | 4 | 5 | 6 |
Line 4: | 2 | 1 | 4 | 3 | 6 | 5 | 8 | 9 | 7 |
Line 5: | 3 | 6 | 5 | 8 | 9 | 7 | 2 | 1 | 4 |
Line 6: | 8 | 9 | 7 | 2 | 1 | 4 | 3 | 6 | 5 |
Line 7: | 5 | 3 | 1 | 6 | 4 | 2 | 9 | 7 | 8 |
Line 8: | 6 | 7 | 8 | 9 | 3 | 1 | 5 | 4 | 2 |
Line 9: | 9 | 4 | 2 | 5 | 7 | 8 | 6 | 3 | 1 |

Line 1: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Line 2: | 4 | 5 | 6 | 7 | 8 | 9 | 1 | 2 | 3 |
Line 3: | 7 | 8 | 9 | 1 | 2 | 3 | 4 | 5 | 6 |
Line 4: | 2 | 1 | 4 | 3 | 6 | 5 | 8 | 9 | 7 |
Line 5: | 3 | 6 | 5 | 8 | 9 | 7 | 2 | 1 | 4 |
Line 6: | 8 | 9 | 7 | 2 | 1 | 4 | 3 | 6 | 5 |
Line 7: | 5 | 3 | 1 | 6 | 4 | 2 | 9 | 7 | 8 |
Line 8: | 9 | 4 | 2 | 5 | 7 | 8 | 6 | 3 | 1 |
Line 9: | 6 | 7 | 8 | 9 | 3 | 1 | 5 | 4 | 2 |

.................................................. ........................
.................................................. ........................
.................................................. ........................



авторLine 1: | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
Line 2: | 6 | 5 | 4 | 3 | 2 | 1 | 9 | 8 | 7 |
Line 3: | 3 | 2 | 1 | 9 | 8 | 7 | 6 | 5 | 4 |
Line 4: | 8 | 9 | 6 | 7 | 4 | 5 | 2 | 1 | 3 |
Line 5: | 7 | 4 | 5 | 2 | 1 | 3 | 8 | 9 | 6 |
Line 6: | 2 | 1 | 3 | 8 | 9 | 6 | 7 | 4 | 5 |
Line 7: | 5 | 7 | 9 | 4 | 6 | 8 | 1 | 3 | 2 |
Line 8: | 1 | 6 | 8 | 5 | 3 | 2 | 4 | 7 | 9 |
Line 9: | 4 | 3 | 2 | 1 | 7 | 9 | 5 | 6 | 8 |

Line 1: | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
Line 2: | 6 | 5 | 4 | 3 | 2 | 1 | 9 | 8 | 7 |
Line 3: | 3 | 2 | 1 | 9 | 8 | 7 | 6 | 5 | 4 |
Line 4: | 8 | 9 | 6 | 7 | 4 | 5 | 2 | 1 | 3 |
Line 5: | 7 | 4 | 5 | 2 | 1 | 3 | 8 | 9 | 6 |
Line 6: | 2 | 1 | 3 | 8 | 9 | 6 | 7 | 4 | 5 |
Line 7: | 5 | 7 | 9 | 4 | 6 | 8 | 1 | 3 | 2 |
Line 8: | 4 | 3 | 2 | 1 | 7 | 9 | 5 | 6 | 8 |
Line 9: | 1 | 6 | 8 | 5 | 3 | 2 | 4 | 7 | 9 |

Line 1: | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
Line 2: | 6 | 5 | 4 | 3 | 2 | 1 | 9 | 8 | 7 |
Line 3: | 3 | 2 | 1 | 9 | 8 | 7 | 6 | 5 | 4 |
Line 4: | 8 | 9 | 6 | 7 | 4 | 5 | 2 | 1 | 3 |
Line 5: | 7 | 4 | 5 | 2 | 1 | 3 | 8 | 9 | 6 |
Line 6: | 2 | 1 | 3 | 8 | 9 | 6 | 7 | 4 | 5 |
Line 7: | 5 | 7 | 9 | 4 | 6 | 8 | 1 | 3 | 2 |
Line 8: | 4 | 3 | 8 | 1 | 7 | 2 | 5 | 6 | 9 |
Line 9: | 1 | 6 | 2 | 5 | 3 | 9 | 4 | 7 | 8 |

Line 1: | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
Line 2: | 6 | 5 | 4 | 3 | 2 | 1 | 9 | 8 | 7 |
Line 3: | 3 | 2 | 1 | 9 | 8 | 7 | 6 | 5 | 4 |
Line 4: | 8 | 9 | 6 | 7 | 4 | 5 | 2 | 1 | 3 |
Line 5: | 7 | 4 | 5 | 2 | 1 | 3 | 8 | 9 | 6 |
Line 6: | 2 | 1 | 3 | 8 | 9 | 6 | 7 | 4 | 5 |
Line 7: | 5 | 7 | 9 | 4 | 6 | 8 | 1 | 3 | 2 |
Line 8: | 4 | 6 | 2 | 1 | 3 | 9 | 5 | 7 | 8 |
Line 9: | 1 | 3 | 8 | 5 | 7 | 2 | 4 | 6 | 9 |

Line 1: | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
Line 2: | 6 | 5 | 4 | 3 | 2 | 1 | 9 | 8 | 7 |
Line 3: | 3 | 2 | 1 | 9 | 8 | 7 | 6 | 5 | 4 |
Line 4: | 8 | 9 | 6 | 7 | 4 | 5 | 2 | 1 | 3 |
Line 5: | 7 | 4 | 5 | 2 | 1 | 3 | 8 | 9 | 6 |
Line 6: | 2 | 1 | 3 | 8 | 9 | 6 | 7 | 4 | 5 |
Line 7: | 5 | 7 | 9 | 4 | 6 | 8 | 1 | 3 | 2 |
Line 8: | 4 | 6 | 8 | 1 | 3 | 2 | 5 | 7 | 9 |
Line 9: | 1 | 3 | 2 | 5 | 7 | 9 | 4 | 6 | 8 |

Lenny
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36363976
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
--- This one you have to execute if you want to change table ---
Код: plaintext
drop table Sd_Source;

--- Execute this one time when you create the table, or if you want recreate table ---
--- 1---.

Код: plaintext
1.
2.
3.
4.
5.
create table Sd_Source 
(sd_id	integer	not null,
 sd_Lnum  integer	not null,
 sd_SLine Varchar( 9 ) not null, 
 get_id  integer,
 ins_tms timestamp not null with default);

--- 2---.
Код: plaintext
1.
CREATE UNIQUE INDEX IX_Source 
ON Sd_Source (sd_id ASC, sd_Lnum asc) CLUSTER;

--- Don't need if you don't want to change the view ---
Код: plaintext
drop view SDVW_SOLUTION;

--- Now you have to create view (don't worry if you have warning message) (Code in attachment): ---
Код: plaintext
1.
2.
create view SDVW_Solution 
(Sudoku_Solution, Source_id, Source_line) as
with.... (get from attachment)....


These operations are required any time when you add the new Sudoku which you want to solve:

--- Any time when you add the new sudoku puzzle to the Sd_Source table
you can use following query, or any query which you can create, for insert into Sd_Source : ---


Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id),  0 ) +  1 ,  1 , '080100920' 
	 , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())	   
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  2 , '000005000'
	 , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  3 , '024000380'
	 , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id),  0 ) +  1 ,  4 , '091003000'
	 , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  5 , '060000040'
	 , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  6 , '000800290'
	 , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  7 , '035000760'
	 , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  8 , '000500000'
	 , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  9 , '079006010'
	 , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source
);

--- If you want to solve sudoku with sd_id = K <= max(sd_id) you have to: ---

Код: plaintext
1.
2.
update Sd_Source  
   set get_id = K
where ins_tms = (select max(ins_tms) from Sd_Source);

---If Sd_Source table is not empty you can get sudoku solution from the view, using this: ---
select sudoku_solution from SDVW_SOLUTION

--- or with query
Код: plaintext
select * from SDVW_SOLUTION

Lenny

P.S. All logics and P/L code you can get from attachment....
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36413984
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
NY Post Sudoku Difficult #1400 << 1 sec >>

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id),  0 ) +  1 ,  1 , '000000000' 
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  2 , '204705308'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  3 , '060308010'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id),  0 ) +  1 ,  4 , '003000500'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  5 , '950000036'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  6 , '006000700'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  7 , '080103050'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  8 , '407809601'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  9 , '000000000' 
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
);

авторLine 1: | 3 | 1 | 8 | 2 | 4 | 6 | 9 | 7 | 5 |
Line 2: | 2 | 9 | 4 | 7 | 1 | 5 | 3 | 6 | 8 |
Line 3: | 7 | 6 | 5 | 3 | 9 | 8 | 2 | 1 | 4 |
Line 4: | 8 | 7 | 3 | 9 | 6 | 1 | 5 | 4 | 2 |
Line 5: | 9 | 5 | 2 | 4 | 8 | 7 | 1 | 3 | 6 |
Line 6: | 1 | 4 | 6 | 5 | 3 | 2 | 7 | 8 | 9 |
Line 7: | 6 | 8 | 9 | 1 | 2 | 3 | 4 | 5 | 7 |
Line 8: | 4 | 3 | 7 | 8 | 5 | 9 | 6 | 2 | 1 |
Line 9: | 5 | 2 | 1 | 6 | 7 | 4 | 8 | 9 | 3 |

Lenny
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36453715
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Friday Level-4 Sudoku from "AMNY" <5 sec>:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id),  0 ) +  1 ,  1 , '030006080' 
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  2 , '000000900'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  3 , '700020000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id),  0 ) +  1 ,  4 , '201070500'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  5 , '007000600'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  6 , '005060801'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  7 , '000740009'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  8 , '008000200'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  9 , '070500030'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
); 

Line 1: | 1 | 3 | 2 | 4 | 9 | 6 | 7 | 8 | 5 |
Line 2: | 6 | 5 | 4 | 3 | 8 | 7 | 9 | 1 | 2 |
Line 3: | 7 | 8 | 9 | 1 | 2 | 5 | 3 | 4 | 6 |
Line 4: | 2 | 6 | 1 | 8 | 7 | 3 | 5 | 9 | 4 |
Line 5: | 8 | 4 | 7 | 9 | 5 | 1 | 6 | 2 | 3 |
Line 6: | 3 | 9 | 5 | 2 | 6 | 4 | 8 | 7 | 1 |
Line 7: | 5 | 2 | 3 | 7 | 4 | 8 | 1 | 6 | 9 |
Line 8: | 4 | 1 | 8 | 6 | 3 | 9 | 2 | 5 | 7 |
Line 9: | 9 | 7 | 6 | 5 | 1 | 2 | 4 | 3 | 8 |

Lenny
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36597246
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Friday Apr 23 2010 Sudoku:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id),  0 ) +  1 ,  1 , '640900030'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  2 , '000000010'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  3 , '000400200'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id),  0 ) +  1 ,  4 , '010000005'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  5 , '000067004'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  6 , '500030090'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  7 , '007004000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  8 , '030000000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  9 , '090000827'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source );


Result:

Line 1: | 6 | 4 | 1 | 9 | 7 | 2 | 5 | 3 | 8 |
Line 2: | 9 | 7 | 2 | 3 | 8 | 5 | 4 | 1 | 6 |
Line 3: | 8 | 5 | 3 | 4 | 1 | 6 | 2 | 7 | 9 |
Line 4: | 7 | 1 | 8 | 2 | 4 | 9 | 3 | 6 | 5 |
Line 5: | 3 | 2 | 9 | 5 | 6 | 7 | 1 | 8 | 4 |
Line 6: | 5 | 6 | 4 | 8 | 3 | 1 | 7 | 9 | 2 |
Line 7: | 1 | 8 | 7 | 6 | 2 | 4 | 9 | 5 | 3 |
Line 8: | 2 | 3 | 5 | 7 | 9 | 8 | 6 | 4 | 1 |
Line 9: | 4 | 9 | 6 | 1 | 5 | 3 | 8 | 2 | 7 |

Lenny
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36643616
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Level-4 Sudoku. AMNY 05/21/2010 <5 sec>:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id),  0 ) +  1 ,  1 , '790030400'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  2 , '058000200'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  3 , '000000006'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id),  0 ) +  1 ,  4 , '900010008'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  5 , '000987000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  6 , '200050007'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  7 , '300000000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  8 , '029000840'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  9 , '006020059'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
);

Result:

Line 1: | 7 | 9 | 2 | 6 | 3 | 8 | 4 | 1 | 5 |
Line 2: | 6 | 5 | 8 | 1 | 4 | 9 | 2 | 7 | 3 |
Line 3: | 4 | 1 | 3 | 5 | 7 | 2 | 9 | 8 | 6 |
Line 4: | 9 | 6 | 7 | 2 | 1 | 4 | 5 | 3 | 8 |
Line 5: | 1 | 3 | 5 | 9 | 8 | 7 | 6 | 2 | 4 |
Line 6: | 2 | 8 | 4 | 3 | 5 | 6 | 1 | 9 | 7 |
Line 7: | 3 | 4 | 1 | 8 | 9 | 5 | 7 | 6 | 2 |
Line 8: | 5 | 2 | 9 | 7 | 6 | 3 | 8 | 4 | 1 |
Line 9: | 8 | 7 | 6 | 4 | 2 | 1 | 3 | 5 | 9 |

Sudoku Level: Hard Metro NY 05/21/2010 <0 sec>:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id),  0 ) +  1 ,  1 , '002059100'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  2 , '140080000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  3 , '003004008'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id),  0 ) +  1 ,  4 , '200093080'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  5 , '008000500'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  6 , '050720003'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  7 , '500400600'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  8 , '000060041'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  9 , '006930800'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
);

Result:

Line 1: | 8 | 7 | 2 | 3 | 5 | 9 | 1 | 6 | 4 |
Line 2: | 1 | 4 | 5 | 6 | 8 | 7 | 3 | 9 | 2 |
Line 3: | 9 | 6 | 3 | 2 | 1 | 4 | 7 | 5 | 8 |
Line 4: | 2 | 1 | 7 | 5 | 9 | 3 | 4 | 8 | 6 |
Line 5: | 3 | 9 | 8 | 1 | 4 | 6 | 5 | 2 | 7 |
Line 6: | 6 | 5 | 4 | 7 | 2 | 8 | 9 | 1 | 3 |
Line 7: | 5 | 8 | 1 | 4 | 7 | 2 | 6 | 3 | 9 |
Line 8: | 7 | 3 | 9 | 8 | 6 | 5 | 2 | 4 | 1 |
Line 9: | 4 | 2 | 6 | 9 | 3 | 1 | 8 | 7 | 5 |

Lenny
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36722093
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Level: "Hard" Sudoku from "Metro", NY:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id),  0 ) +  1 ,  1 , '304701500'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  2 , '000000070'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  3 , '000005803'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id),  0 ) +  1 ,  4 , '000850109'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  5 , '005127300'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  6 , '801039000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  7 , '602900000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  8 , '070000000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  9 , '009608207'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
);

select sudoku_solution from SDVW_SOLUTION;

Result:

Line 1: | 3 | 9 | 4 | 7 | 8 | 1 | 5 | 6 | 2 |
Line 2: | 2 | 5 | 8 | 3 | 6 | 4 | 9 | 7 | 1 |
Line 3: | 7 | 1 | 6 | 2 | 9 | 5 | 8 | 4 | 3 |
Line 4: | 4 | 3 | 7 | 8 | 5 | 6 | 1 | 2 | 9 |
Line 5: | 9 | 6 | 5 | 1 | 2 | 7 | 3 | 8 | 4 |
Line 6: | 8 | 2 | 1 | 4 | 3 | 9 | 7 | 5 | 6 |
Line 7: | 6 | 8 | 2 | 9 | 7 | 3 | 4 | 1 | 5 |
Line 8: | 1 | 7 | 3 | 5 | 4 | 2 | 6 | 9 | 8 |
Line 9: | 5 | 4 | 9 | 6 | 1 | 8 | 2 | 3 | 7 |

Lenny
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36791933
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Why Friday's Sudoku ?

Because on Friday "AM" NY usually publish Level-4 Sudoku, any other levels for My Solver like sunflower seeds for elephant.


Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id),  0 ) +  1 ,  1 , '000000000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  2 , '020508030'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  3 , '030090004'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id),  0 ) +  1 ,  4 , '800305062'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  5 , '000800000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  6 , '570904008'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  7 , '600050070'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  8 , '080701050'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  9 , '400000000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
);

select sudoku_solution from SDVW_SOLUTION;

Result:

Line 1: | 7 | 6 | 8 | 1 | 4 | 3 | 2 | 9 | 5 |
Line 2: | 9 | 2 | 4 | 5 | 6 | 8 | 7 | 3 | 1 |
Line 3: | 1 | 3 | 5 | 2 | 9 | 7 | 6 | 8 | 4 |
Line 4: | 8 | 4 | 1 | 3 | 7 | 5 | 9 | 6 | 2 |
Line 5: | 3 | 9 | 2 | 8 | 1 | 6 | 5 | 4 | 7 |
Line 6: | 5 | 7 | 6 | 9 | 2 | 4 | 3 | 1 | 8 |
Line 7: | 6 | 1 | 3 | 4 | 5 | 2 | 8 | 7 | 9 |
Line 8: | 2 | 8 | 9 | 7 | 3 | 1 | 4 | 5 | 6 |
Line 9: | 4 | 5 | 7 | 6 | 8 | 9 | 1 | 2 | 3 |

Lenny
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36854005
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
/* Any time when you add the new sudoku puzzle to the Sd_Source table
you have to use following query, or any query which you want to use for insert
After insert into table, you can select sudoku_solution from SDVW_SOLUTION
*/


Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id),  0 ) +  1 ,  1 , '060030008'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  2 , '000060040'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  3 , '029000000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id),  0 ) +  1 ,  4 , '008200100'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  5 , '500040006'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  6 , '001008700'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  7 , '004000380'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  8 , '030000000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  9 , '700090025'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
);

select sudoku_solution from SDVW_SOLUTION;

Result:

Line 1: | 4 | 6 | 7 | 9 | 3 | 2 | 5 | 1 | 8 |
Line 2: | 1 | 5 | 3 | 8 | 6 | 7 | 2 | 4 | 9 |
Line 3: | 8 | 2 | 9 | 4 | 1 | 5 | 6 | 7 | 3 |
Line 4: | 6 | 9 | 8 | 2 | 7 | 3 | 1 | 5 | 4 |
Line 5: | 5 | 7 | 2 | 1 | 4 | 9 | 8 | 3 | 6 |
Line 6: | 3 | 4 | 1 | 6 | 5 | 8 | 7 | 9 | 2 |
Line 7: | 9 | 1 | 4 | 5 | 2 | 6 | 3 | 8 | 7 |
Line 8: | 2 | 3 | 5 | 7 | 8 | 4 | 9 | 6 | 1 |
Line 9: | 7 | 8 | 6 | 3 | 9 | 1 | 4 | 2 | 5 |

Lenny
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #36890837
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Мой Могучий Решатель Судоку нашёл 283576 решений этой простой, с виду, задачи.

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id),  0 ) +  1 ,  1 , '123000000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  2 , '456000000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  3 , '789000000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id),  0 ) +  1 ,  4 , '000123000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  5 , '000456000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  6 , '000789000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  7 , '000000123'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  8 , '000000456'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  9 , '000000789'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
);

select sudoku_solution from SDVW_SOLUTION;

Results:

Line 1: | 1 | 2 | 3 | 5 | 4 | 7 | 6 | 9 | 8 |
Line 2: | 4 | 5 | 6 | 2 | 9 | 8 | 3 | 1 | 7 |
Line 3: | 7 | 8 | 9 | 3 | 6 | 1 | 2 | 4 | 5 |
Line 4: | 5 | 9 | 7 | 1 | 2 | 3 | 8 | 6 | 4 |
Line 5: | 2 | 3 | 8 | 4 | 5 | 6 | 9 | 7 | 1 |
Line 6: | 6 | 1 | 4 | 7 | 8 | 9 | 5 | 3 | 2 |
Line 7: | 8 | 6 | 5 | 9 | 7 | 4 | 1 | 2 | 3 |
Line 8: | 9 | 7 | 1 | 8 | 3 | 2 | 4 | 5 | 6 |
Line 9: | 3 | 4 | 2 | 6 | 1 | 5 | 7 | 8 | 9 |

Line 1: | 1 | 2 | 3 | 5 | 4 | 7 | 6 | 9 | 8 |
Line 2: | 4 | 5 | 6 | 2 | 9 | 8 | 3 | 1 | 7 |
Line 3: | 7 | 8 | 9 | 3 | 6 | 1 | 2 | 4 | 5 |
Line 4: | 5 | 9 | 7 | 1 | 2 | 3 | 8 | 6 | 4 |
Line 5: | 2 | 3 | 8 | 4 | 5 | 6 | 9 | 7 | 1 |
Line 6: | 6 | 1 | 4 | 7 | 8 | 9 | 5 | 3 | 2 |
Line 7: | 9 | 6 | 5 | 8 | 7 | 4 | 1 | 2 | 3 |
Line 8: | 8 | 7 | 1 | 9 | 3 | 2 | 4 | 5 | 6 |
Line 9: | 3 | 4 | 2 | 6 | 1 | 5 | 7 | 8 | 9 |

.................................................. ..........................
................ 283572 other solutions ............................
.................................................. ..........................

Line 1: | 1 | 2 | 3 | 9 | 7 | 8 | 6 | 4 | 5 |
Line 2: | 4 | 5 | 6 | 3 | 1 | 2 | 9 | 7 | 8 |
Line 3: | 7 | 8 | 9 | 6 | 4 | 5 | 3 | 1 | 2 |
Line 4: | 9 | 7 | 8 | 1 | 2 | 3 | 5 | 6 | 4 |
Line 5: | 3 | 1 | 2 | 4 | 5 | 6 | 8 | 9 | 7 |
Line 6: | 6 | 4 | 5 | 7 | 8 | 9 | 2 | 3 | 1 |
Line 7: | 8 | 9 | 4 | 5 | 6 | 7 | 1 | 2 | 3 |
Line 8: | 2 | 3 | 7 | 8 | 9 | 1 | 4 | 5 | 6 |
Line 9: | 5 | 6 | 1 | 2 | 3 | 4 | 7 | 8 | 9 |

Line 1: | 1 | 2 | 3 | 9 | 7 | 8 | 6 | 4 | 5 |
Line 2: | 4 | 5 | 6 | 3 | 1 | 2 | 9 | 7 | 8 |
Line 3: | 7 | 8 | 9 | 6 | 4 | 5 | 3 | 1 | 2 |
Line 4: | 9 | 7 | 8 | 1 | 2 | 3 | 5 | 6 | 4 |
Line 5: | 3 | 1 | 2 | 4 | 5 | 6 | 8 | 9 | 7 |
Line 6: | 6 | 4 | 5 | 7 | 8 | 9 | 2 | 3 | 1 |
Line 7: | 8 | 9 | 7 | 5 | 6 | 4 | 1 | 2 | 3 |
Line 8: | 2 | 3 | 1 | 8 | 9 | 7 | 4 | 5 | 6 |
Line 9: | 5 | 6 | 4 | 2 | 3 | 1 | 7 | 8 | 9 |

Вася Пупкин
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #37046265
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
/*
Any time when you add the new sudoku puzzle to the Sd_Source table
you have to use following query, or any query which
you want to use for insert start numbers of your Sudoku puzzle.
After insertion into the table performed, you can run
select sudoku_solution from SDVW_SOLUTION view.
*/
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id),  0 ) +  1 ,  1 , '304000006'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  2 , '750004001'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  3 , '000200000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id),  0 ) +  1 ,  4 , '000000530'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  5 , '003070600'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  6 , '087600000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  7 , '000002000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  8 , '200109085'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  9 , '400000709'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
);

select sudoku_solution from SDVW_SOLUTION;

Result:

Line 1: | 3 | 9 | 4 | 5 | 8 | 1 | 2 | 7 | 6 |
Line 2: | 7 | 5 | 2 | 3 | 6 | 4 | 8 | 9 | 1 |
Line 3: | 1 | 6 | 8 | 2 | 9 | 7 | 4 | 5 | 3 |
Line 4: | 6 | 4 | 1 | 9 | 2 | 8 | 5 | 3 | 7 |
Line 5: | 9 | 2 | 3 | 4 | 7 | 5 | 6 | 1 | 8 |
Line 6: | 5 | 8 | 7 | 6 | 1 | 3 | 9 | 4 | 2 |
Line 7: | 8 | 3 | 9 | 7 | 5 | 2 | 1 | 6 | 4 |
Line 8: | 2 | 7 | 6 | 1 | 4 | 9 | 3 | 8 | 5 |
Line 9: | 4 | 1 | 5 | 8 | 3 | 6 | 7 | 2 | 9 |

Lenny
...
Рейтинг: 0 / 0
Версия Терминатора ( DB2-Всемогущий )
    #37131653
Lkhiger
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
/*
Any time when you add the new sudoku puzzle to the Sd_Source table
you have to use following query, or any query which
you want to use for insert start numbers of your Sudoku puzzle.
After insertion into the table performed, you can run
select sudoku_solution from SDVW_SOLUTION view.
*/

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
select max(sd_id) from final table
(insert into Sd_Source  
select ifnull(max(sd_id),  0 ) +  1 ,  1 , '007206800'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())       
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  2 , '006500010'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  3 , '803000000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all 
select ifnull(max(sd_id),  0 ) +  1 ,  4 , '000060350'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  5 , '070000080'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  6 , '052000000'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  7 , '000000703'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  8 , '960003100'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
union all
select ifnull(max(sd_id),  0 ) +  1 ,  9 , '005401900'
     , ifnull(max(sd_id),  0 ) +  1 , timestamp(generate_unique())
  from Sd_Source 
);

select sudoku_solution from SDVW_SOLUTION; 


Result:

Line 1: | 5 | 1 | 7 | 2 | 9 | 6 | 8 | 3 | 4 |
Line 2: | 4 | 9 | 6 | 5 | 3 | 8 | 2 | 1 | 7 |
Line 3: | 8 | 2 | 3 | 1 | 4 | 7 | 5 | 9 | 6 |
Line 4: | 1 | 4 | 8 | 7 | 6 | 2 | 3 | 5 | 9 |
Line 5: | 6 | 7 | 9 | 3 | 1 | 5 | 4 | 8 | 2 |
Line 6: | 3 | 5 | 2 | 9 | 8 | 4 | 6 | 7 | 1 |
Line 7: | 2 | 8 | 1 | 6 | 5 | 9 | 7 | 4 | 3 |
Line 8: | 9 | 6 | 4 | 8 | 7 | 3 | 1 | 2 | 5 |
Line 9: | 7 | 3 | 5 | 4 | 2 | 1 | 9 | 6 | 8 |

Lenny
...
Рейтинг: 0 / 0
16 сообщений из 41, страница 2 из 2
Форумы / IBM DB2, WebSphere, IMS, U2 [игнор отключен] [закрыт для гостей] / Версия Терминатора ( DB2-Всемогущий )
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]