000 004 020009 000 000050 200 000060 000 000001 002 007000 008 150014 090 000000 000 030000 800 904

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 17:38:25
0000040200090000000502000000600000000010020070000081500140900000000000300008009040000040200090000000

000 004 020009 000 000050 200 000060 000 000001 002 007000 008 150014 090 000000 000 030000 800 904
000 004 020
009 000 000
050 200 000
060 000 000
001 002 007
000 008 150
014 090 000
000 000 030
000 800 904

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]

000 004 020009 000 000050 200 000060 000 000001 002 007000 008 150014 090 000000 000 030000 800 904 0为空格 394 600 000 000 001 420 200 008 000000 052 030 300 000 004 060 940 000000 800 003 075 600 000 000 009 621 求九宫独000 103 000 800 000 007 004 020 300 001 000 500 000 581 000 600 000 002 090 000 050010 000 030000 275 000 000 340 150 200 596 000000 000 000670 800 003000 004 005002 010 009000 081 000510 709 040006 000 000 求九宫独数答案共一题急~求九宫独000 103 000 800 000 007 004 020 300 001 000 500 000 581 000 600 000 002 090 000 050010 000 030000 275 000 大家解一下九宫格(0为要填数)900 040 000000 000 510 518 070 206250 004 103040 507 060603 200 057701 080 935035 000 000000 050 004 请帮忙解九宫格数独我把需要填的地方,用0代替.麻烦会的朋友.000 004 090020 690 001000 002 803400 060 030075 000 910095 010 002206 500 000700 046 020080 700 000 求高手解下列对角线数独800 030 000003 000 000000 000 000007 050 060010 004 900050 000 000000 010 000070 900 500240 800 000 137 849 005045 000 930096 000 400 704 502 009600 004 700900 706 004 460 000 070 500 407 090不好意思,中间漏了一行。谁能帮我解下咯,比较急。真不意思137 849 005045 000 930096 000 400 704 502 009600 004 700900 706 004 009 000 九宫格 2题 0代表空格 ,每行每列,九个数字都不能重复.130 008 004 500 602 081020 050 006090 100 050810 073 062060 800 090200 030 040650 409 007 900 200 035000 030 009 700 004 200 500 100 000 000 002 000 300 900 005 400 780 010 006 00 由0,1,2,3,4五个数字组成的三位数,有几种组合情况?比如:000,001,002,003,004,010,011,012,013,014等等 求解数独下一个数字怎么填?为什么?0为没有填的数字(用第____行/列,第_____个表示数字位置)000 010 070000 000 980070 004 031725 861 493900 372 856863 549 127350 200 000096 000 000080 050 000 1,000,000,000,000怎么读 100 000 000 000 000多少兆? 巧填成语格花000 马000 000色0花00 0马00 000色00花0 00马0 000色000花 000马 000色 1.000,000,000,*13,000,000,000等于多少是13,000,000,000,000,000,000还是13,000,000,000 1000 000 000 000 000 000读作什么 10,000,000,000,000,000这个数怎么读?