好题,也非常有用,犯了几个错误1.在枚举赋值的时候,思维有个错误:当当前的赋值不能填完这个数独,应该是继续下一个循环,而不是return false 终止枚举2.Generic Programing写错了,,,本来那个memset想写成Generic Programing的,,,然后,永远仅仅有第一...
                            
                            
                                分类:
其他好文   时间:
2014-10-17 13:43:36   
                                阅读次数:
191
                             
                    
                        
                            
                            
                                题意:自行脑补
思路:网络流,建模显然,若满流则可以
代码:#include 
#include 
#include 
#include 
#include 
#include 
using namespace std;
 
#define INF 0x3f3f3f3f
 
queue q;
struct Solver {
    int head[200], next[6010], end[...
                            
                            
                                分类:
其他好文   时间:
2014-10-17 12:08:28   
                                阅读次数:
169
                             
                    
                        
                            
                            
                                问题来源:leetCode Sudoku SolverWrite a program to solve aSudoku puzzle by filling the empty cells.Empty cells are indicated by the character *.*.You may a...
                            
                            
                                分类:
其他好文   时间:
2014-10-15 18:52:21   
                                阅读次数:
216
                             
                    
                        
                            
                            
                                DLX精确覆盖模版题.....
Sudoku
Time Limit: 10000MS
 
Memory Limit: 65536K
Total Submissions: 4416
 
Accepted: 2143
Description
A Sudoku grid is a 16x16 grid of c...
                            
                            
                                分类:
其他好文   时间:
2014-10-14 00:45:47   
                                阅读次数:
360
                             
                    
                        
                            
                            
                                Sudoku Solver
 Total Accepted: 13937 Total
 Submissions: 66832My Submissions
Write a program to solve a Sudoku puzzle by filling the empty cells.
Empty cells are indicated by the character...
                            
                            
                                分类:
其他好文   时间:
2014-10-14 00:40:37   
                                阅读次数:
246
                             
                    
                        
                            
                            
                                DLX精确覆盖.....模版题
Sudoku
Time Limit: 1000MS
 
Memory Limit: 65536K
Total Submissions: 8336
 
Accepted: 2945
Description
In the game of Sudoku, you are ...
                            
                            
                                分类:
其他好文   时间:
2014-10-13 23:32:57   
                                阅读次数:
347
                             
                    
                        
                            
                            
                                [leetcode]Write a program to solve a Sudoku puzzle by filling the empty cells....
                            
                            
                                分类:
其他好文   时间:
2014-10-10 15:52:10   
                                阅读次数:
188
                             
                    
                        
                            
                            
                                Sudoku Checker
Time Limit: 2000/1000MS (Java/Others)
Memory Limit: 128000/64000KB (Java/Others)
SubmitStatus
Problem Description
Sudoku is a popular single player game. The objective is to...
                            
                            
                                分类:
其他好文   时间:
2014-10-04 13:52:16   
                                阅读次数:
304
                             
                    
                        
                            
                            
                                利用 Dancing Link 来解数独
具体的可以看    lrj 的训练指南 和 《 Dancing Links 在搜索中的应用 》这篇论文
Dancing Link 来求解数独 , 是通过求解精确覆盖
精确覆盖就是给出一个 01 矩阵 , 要求我们选择一些行 , 使得每一列有且仅有一个 1
对于数独问题 , 行就是我们的选择 , 即在第 i 行 第 j 列 放上 数字...
                            
                            
                                分类:
其他好文   时间:
2014-09-30 02:38:51   
                                阅读次数:
362