12.07.2015 Views

Spis treœci - Patrz

Spis treœci - Patrz

Spis treœci - Patrz

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

writeln(l:2,0:2,0:2,0:2,0:2,0:2,0:2,0:2,0:2)end.program W;var u: array[1..8] of integer;{tablica z układem}i,j: integer;z: set of 1..8; {zbiór pól szachowanych}beginwhile not eof do beginreadln(j ,u[l] ,u[2] ,u[3] ,u[4] ,u[5] ,u[6] ,u[7] ,u[8]);z := [];for i:=l to j-1 do {wyznaczanie pól szachowanych}z := z + [u[i]] + [u[i]-(j-i)] + [u[i] + (j-i)];for i := 1 to 8 do {dostawianie hetmana}if not (i in z) then begin{pole nieszachowane}endend.u[j] := i; {tu można dostawić}writeln(j + l,u[l] :4,u[2] :2,u[3] :2,u[4] :2,u[5] :2,u[6] :2,u[7] :2,u[8] :2)endWydając polecenieINIT|W|W|W|W|W|W|W|W >wynikna pliku wynik otrzymamy wszystkie 92 rozwiązania. W rzeczywistości tylko 12 jest istotnieróżnych. Pozostałe powstają z nich przez obrót lub symetrię (por. [WirtSO]).284

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!