> > >
 
  (#1 (permalink))
kost kost
Member
 
: 1,081
() : 0
0 () 0
: 05.10.2004
 - 15.12.2004, 19:32

, , .

:
n.
:
- n n x n , .

:
, - (20 , ).
.

:
. n x n. , , (0; 0) , () . , .
  (#2 (permalink))
SiMM SiMM
Member
 
: 1,961
() : 0
0 () 0
: 02.08.2003
 15.12.2004, 20:27

: , .
.
  (#3 (permalink))
Scorpion1105 Scorpion1105
Member
 
: 74
() : 0
0 () 0
: 10.12.2004
 20.12.2004, 00:42

, :
http://www.hardforum.ru/t56156
, , . , . - , =)
  (#4 (permalink))
Scorpion1105 Scorpion1105
Member
 
: 74
() : 0
0 () 0
: 10.12.2004
 - 01.02.2005, 14:17

,
:
procedure Backtracking;
{  }
var t: extended;
begin
    {}
    initialize;
    k := 1;
    t := 0;
    {      }
    FormSk;
    {       }
    while (k > 0) and (not solution_found) do
    begin
        {      }
        while (ElCount <> 0) and (not solution_found) do
        begin
            {     }
            Choose(Solution[k]);
            {  , }
            if ElCount = 0 then continue;
            {     }
            ExcludeSol(Solution[k]);
            {,  }
            Board[Solution[k].i,Solution[k].j].visited := true;
            { ר }
            count := count + 1;
            { }
            if CheckSolution then solution_found := true
            else    { }
            begin
                inc(k);
                {    }
                FormSk
            end{else}
        end;{while}
        {    ,    }
        if not solution_found then
        begin
            dec(k);      {BackTrack}
            { ר }
            back_ret := back_ret + 1;
            {   }
            Board[Solution[k].i,Solution[k].j].visited := false;
            {    }
            Solution[k].i := 0;
            Solution[k].j := 0
        end;
        {   }
        if back_ret > back_Max then
        begin
            t := t + 1;
            initialize;
            { S1  }
            k := 1;
            writeln('  !!!');
        end
    end{while};
    {   }
    if t > 0 then
    begin
        count := t * back_Max + count;
        back_ret := t * back_Max + back_ret
    end
end;{Backtracking}
  (#5 (permalink))
Scorpion1105 Scorpion1105
Member
 
: 74
() : 0
0 () 0
: 10.12.2004
 - 01.02.2005, 14:17

,
:
procedure Backtracking;
{  }
var t: extended;
begin
    {}
    initialize;
    k := 1;
    t := 0;
    {      }
    FormSk;
    {       }
    while (k > 0) and (not solution_found) do
    begin
        {      }
        while (ElCount <> 0) and (not solution_found) do
        begin
            {     }
            Choose(Solution[k]);
            {  , }
            if ElCount = 0 then continue;
            {     }
            ExcludeSol(Solution[k]);
            {,  }
            Board[Solution[k].i,Solution[k].j].visited := true;
            { ר }
            count := count + 1;
            { }
            if CheckSolution then solution_found := true
            else    { }
            begin
                inc(k);
                {    }
                FormSk
            end{else}
        end;{while}
        {    ,    }
        if not solution_found then
        begin
            dec(k);      {BackTrack}
            { ר }
            back_ret := back_ret + 1;
            {   }
            Board[Solution[k].i,Solution[k].j].visited := false;
            {    }
            Solution[k].i := 0;
            Solution[k].j := 0
        end;
        {   }
        if back_ret > back_Max then
        begin
            t := t + 1;
            initialize;
            { S1  }
            k := 1;
            writeln('  !!!');
        end
    end{while};
    {   }
    if t > 0 then
    begin
        count := t * back_Max + count;
        back_ret := t * back_Max + back_ret
    end
end;{Backtracking}
Ads.
  (#6 (permalink))
Scorpion1105 Scorpion1105
Member
 
: 74
() : 0
0 () 0
: 10.12.2004
 - 01.02.2005, 14:17

,
:
procedure Backtracking;
{  }
var t: extended;
begin
    {}
    initialize;
    k := 1;
    t := 0;
    {      }
    FormSk;
    {       }
    while (k > 0) and (not solution_found) do
    begin
        {      }
        while (ElCount <> 0) and (not solution_found) do
        begin
            {     }
            Choose(Solution[k]);
            {  , }
            if ElCount = 0 then continue;
            {     }
            ExcludeSol(Solution[k]);
            {,  }
            Board[Solution[k].i,Solution[k].j].visited := true;
            { ר }
            count := count + 1;
            { }
            if CheckSolution then solution_found := true
            else    { }
            begin
                inc(k);
                {    }
                FormSk
            end{else}
        end;{while}
        {    ,    }
        if not solution_found then
        begin
            dec(k);      {BackTrack}
            { ר }
            back_ret := back_ret + 1;
            {   }
            Board[Solution[k].i,Solution[k].j].visited := false;
            {    }
            Solution[k].i := 0;
            Solution[k].j := 0
        end;
        {   }
        if back_ret > back_Max then
        begin
            t := t + 1;
            initialize;
            { S1  }
            k := 1;
            writeln('  !!!');
        end
    end{while};
    {   }
    if t > 0 then
    begin
        count := t * back_Max + count;
        back_ret := t * back_Max + back_ret
    end
end;{Backtracking}
  (#7 (permalink))
Scorpion1105 Scorpion1105
Member
 
: 74
() : 0
0 () 0
: 10.12.2004
 - 01.02.2005, 14:17

,
:
procedure Backtracking;
{  }
var t: extended;
begin
    {}
    initialize;
    k := 1;
    t := 0;
    {      }
    FormSk;
    {       }
    while (k > 0) and (not solution_found) do
    begin
        {      }
        while (ElCount <> 0) and (not solution_found) do
        begin
            {     }
            Choose(Solution[k]);
            {  , }
            if ElCount = 0 then continue;
            {     }
            ExcludeSol(Solution[k]);
            {,  }
            Board[Solution[k].i,Solution[k].j].visited := true;
            { ר }
            count := count + 1;
            { }
            if CheckSolution then solution_found := true
            else    { }
            begin
                inc(k);
                {    }
                FormSk
            end{else}
        end;{while}
        {    ,    }
        if not solution_found then
        begin
            dec(k);      {BackTrack}
            { ר }
            back_ret := back_ret + 1;
            {   }
            Board[Solution[k].i,Solution[k].j].visited := false;
            {    }
            Solution[k].i := 0;
            Solution[k].j := 0
        end;
        {   }
        if back_ret > back_Max then
        begin
            t := t + 1;
            initialize;
            { S1  }
            k := 1;
            writeln('  !!!');
        end
    end{while};
    {   }
    if t > 0 then
    begin
        count := t * back_Max + count;
        back_ret := t * back_Max + back_ret
    end
end;{Backtracking}
  (#8 (permalink))
Mikle Mikle
Member
 
: 38
() : 0
0 () 0
: 15.05.2005
 16.05.2005, 16:21

:
(7*7, 11*11 . .) , (1:2, 6:3 . .) .

:
+2 -2, /, +1 -1, /. / . 1 , . , , , .

, :
http://tuapse-mikle.narod.ru/ChessWay.rar
  (#9 (permalink))
Mikle Mikle
Member
 
: 38
() : 0
0 () 0
: 15.05.2005
 16.08.2010, 11:17

- . :upset:
- ? .

:
, :
http://tuapse-mikle.narod.ru/ChessWay.zip
Ads

« | »


.
HTML .
Pingbacks are .
Refbacks are .


Stemy Prolog 77 04.07.2011 02:00
Visual Prolog 7.2 esprit_bel Prolog 5 12.10.2010 09:15
imported_SaboteuR Prolog 119 25.01.2010 13:07
. /++ 3 29.12.2009 13:45
. . 12345 Prolog 8 15.08.2009 00:26
, - ... sergey1801 Pascal 2 01.11.2008 06:48
, .... _ Prolog 2 06.03.2008 14:57
, , Prolog 2 26.12.2007 17:16
randomizer Prolog 3 11.09.2007 22:19
Caption 1 Sputni_ck C++ Builder 11 13.01.2007 12:19
windsurfer Assembler 0 21.12.2004 20:10
messages goal Anonymous Prolog 29 05.01.2004 18:55



Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
ardforum.ru - ,

- -