diff --git a/20240823/十四届蓝桥比赛/test.txt b/20240823/十四届蓝桥比赛/test.txt new file mode 100644 index 0000000..a3d7939 --- /dev/null +++ b/20240823/十四届蓝桥比赛/test.txt @@ -0,0 +1,9 @@ +17.5..8.. +.52.1.... +.....759. +.8...94.3 +.197.4..8 +7......15 +4.1...6.. +3...2..59 +...96..3. \ No newline at end of file diff --git a/20240823/十四届蓝桥比赛/数独填数.cpp b/20240823/十四届蓝桥比赛/数独填数.cpp index 76b26b6..e92b354 100644 --- a/20240823/十四届蓝桥比赛/数独填数.cpp +++ b/20240823/十四届蓝桥比赛/数独填数.cpp @@ -1,7 +1,104 @@ +//NOT DONE #include using namespace std; +#ifdef OI +#define DB(code){code} +#else +#define DB(code) +#endif + +int m[10][10]; +// bool check_h[10][10],check_l[10][10],check_yx[20][10],check_zx[20][10]; +// bool check_all(int x,int y,int num){ +// if(check_h[x][num]){ +// return false; +// } +// if(check_l[y][num]){ +// return false; +// } +// if(check_yx[x-y+8][num]){ +// return false; +// } +// if(check_zx[]) +// } + +// bool check(int x,int y,int num); +bool check(int x,int y,int num); +void dfs(int x,int y){ + if(x==9&&y==9){ + for(int i=1;i<=9;i++){ + for(int j=1;j<=9;j++){ + cout<=1&&j>=1;i--,j--){ + if(m[i][j]==num){ + return false; + } + } + return true; +} + +/* +17.5..8.. +.52.1.... +.....759. +.8...94.3 +.197.4..8 +7......15 +4.1...6.. +3...2..59 +...96..3. +*/ \ No newline at end of file