Robert C. Helling wrote:
On Thu, 20 Apr 2006, Ilmari Karonen wrote:
Ilmari Karonen wrote:
Incidentally, here's the hardcoded-givens version. It's indeed quite a
lot faster the generic version -- I've yet to find a puzzle that would
take more than 0.1 seconds to solve on my workstation.
Try
....3....
.15...6..
6..2..34.
...6...8.
.39...5..
5.....9.2
.........
...97.25.
1...5..7.
0.3 seconds.
or
.98......
....7....
....15...
1........
...2....9
...9.6.82
.......3.
5.1......
...4...2.
5 seconds.
But flipping the last one by 180 degrees makes it _really_ tough on the
regexp, which always solves the puzzles in left-right, top-down order.
Solving it that way around takes well over 3 _minutes_.
--
Ilmari Karonen