题目链接:
http://poj.org/problem?id=2676
题意:
给出一个未填的数独,求这个数独的解并输出填好的数独,若此数独无解,则输出原给定的错误数独。
题解:
dfs回溯搜索
代码:
#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<string.h>
using namespace std;
int flag,T,f[15][15],c[15][15];
char shu[15];
int vis[4][4][10],visx[15][10],visy[15][10];
void init()
{