...皮蛋黄瓜汤、431213:有抄袭嫌疑,Magi
编辑: admin 2017-25-02
-
4
改好了~
541678923
763295481
892134576
625317849
179486352
438952167
354769218
987521634
216843795
提示:
这么简单的数独还值得抄袭?太小看人了。看看我的"被采纳回答"吧,没有被数独难倒过的。要过程,就把自己小看了,总应该自己动动脑吧。
5 4 1 6 7 8 9 3 2
3 9 7 2 4 5 8 6 1
2 6 8 1 9 3 5 7 4
6 2 5 8 3 7 1 4 9
8 1 9 4 5 6 3 2 7
4 7 3 9 1 2 6 8 5
类似问题
类似问题1:数独,9*5*****84**57*1*6*276***4**96**35127*4*1*3**21*98***4*81**4*9*3**8***51**2**7*6**代表空格[数学科目]
965421738
438579126
127638945
896743512
754216389
213985674
681354297
379862451
542197863
类似问题2:数独 答案003 000 004020 000 050060 500 002200 000 961005 900 000040 072 000819 020 600000 301 008000 080 020(0是空着的)规则不知道的看这告诉我这题的编码也好,谢谢了![数学科目]
这个题很烂,第一不是唯一解,第一不符合数独题目对称的要求.
解1
593 267 814
721 849 356
468 513 792
237 458 961
185 936 247
946 172 583
819 724 635
652 391 478
374 685 129
解2
593 268 714
428 719 356
761 543 892
237 854 961
185 936 247
946 172 583
819 427 635
652 391 478
374 685 129
类似问题3:100000709030000020020050306470100000058000200000408000003060000000049650000001002[数学科目]
*-----------------------------------------------*
| 1 6 5| 2 3 4| 7 8 9|
| 7 3 9| 8 1 6| 5 2 4|
| 8 2 4| 9 5 7| 3 1 6|
|---------------+---------------+---------------|
| 4 7 2| 1 9 5| 8 6 3|
| 9 5 8| 6 7 3| 2 4 1|
| 3 1 6| 4 2 8| 9 7 5|
|---------------+---------------+---------------|
| 5 4 3| 7 6 2| 1 9 8|
| 2 8 1| 3 4 9| 6 5 7|
| 6 9 7| 5 8 1| 4 3 2|
*-----------------------------------------------*
类似问题4:000 004 020009 000 000050 200 000060 000 000001 002 007000 008 150014 090 000000 000 030000 800 904[英语科目]
7 8 6 5 1 4 3 2 9
2 4 9 3 7 6 5 8 1
1 5 3 2 8 9 4 7 6
4 6 5 1 3 7 8 9 2
8 3 1 9 5 2 6 4 7
9 2 7 6 4 8 1 5 3
5 1 4 7 9 3 2 6 8
6 9 8 4 2 1 7 3 5
3 7 2 8 6 5 9 1 4
附解题程序代码
program zk;{20:16 -22:12}
const n=9;
var
i,j,a,b,c,t,p:longint;
map:array [1..9,1..9] of longint;
hang,lie,gong:array [1..9,1..9] of boolean;
h,l,g:array [1..9] of longint;
ok:boolean;
wei:array [1..9,1..9] of longint=((1,1,1,2,2,2,3,3,3),(1,1,1,2,2,2,3,3,3),(1,1,1,2,2,2,3,3,3),(4,4,4,5,5,5,6,6,6),(4,4,4,5,5,5,6,6,6),(4,4,4,5,5,5,6,6,6),(7,7,7,8,8,8,9,9,9),(7,7,7,8,8,8,9,9,9),(7,7,7,8,8,8,9,9,9));
lin,lll:array [1..10] of longint;
procedure print;
var
a,b:longint;
begin
for a:=1 to 9 do
begin
for b:=1 to 9 do
write(map[a,b],' ');
writeln;
end;
end;
procedure sou(k,z:longint);
var
s:longint;
begin
if z=10 then begin inc(k); z:=1; end;
if (k=10) and (z=1) then begin print; ok:=true; exit; end;
if k=10 then exit;
if map[lin[k],lll[z]]=0
then
for s:=1 to 9 do
if (hang[lin[k],s]=false) and (gong[wei[lin[k],lll[z]],s]=false) and (lie[lll[z],s]=false) then
begin
map[lin[k],lll[z]]:=s;
hang[lin[k],s]:=true; lie[lll[z],s]:=true; gong[wei[lin[k],lll[z]],s]:=true;
sou(k,z+1);
if ok then exit;
hang[lin[k],s]:=false; lie[lll[z],s]:=false; gong[wei[lin[k],lll[z]],s]:=false;
map[lin[k],lll[z]]:=0;
end else
else sou(k,z+1);
end;
begin
assign(input,'sudoku.in');
assign(output,'sudoku.out');
reset(input);
rewrite(output);
readln(t);
for p:=1 to t do
begin
for i:=1 to 9 do
begin
lin[i]:=i;
lll[i]:=i;
end;
fillchar(hang,sizeof(hang),false);
fillchar(lie,sizeof(lie),false);
fillchar(gong,sizeof(gong),false);
fillchar(h,sizeof(h),0);
fillchar(l,sizeof(l),0);
fillchar(g,sizeof(g),0);
ok:=false;
for i:=1 to 9 do
begin
for j:=1 to 9 do
begin
read(map[i,j]);
if map[i,j]0 then
begin
hang[i,map[i,j]]:=true; inc(h[i]);
lie[j,map[i,j]]:=true; inc(l[j]);
gong[wei[i,j],map[i,j]]:=true; inc(g[wei[i,j]]);
end;
end;
readln;
end;
for i:=1 to n do
for j:=i to n do
if h[i]
类似问题5:070 000 060003 407 100500 809 003100 698 002009 030 500300 512 007700 906 001004 301 900690 000 030[数学科目]
如下:
472 153 869
983 467 125
516 829 473
157 698 342
269 734 518
348 512 697
735 946 281
824 371 956
691 285 734