130
810 O(R,Q+1)=O(R,Q+1)+O(R,G(J))
820 NEXT R
830 NEXT J
840 FOR J=1 TO P
850 FOR R=1 TO N
860 IF (O(R,Q+1)=0) AND (B(R,J)=1) THEN GOTO 880
870 NEXT R:GOTO 750
880 NEXT J
890 FOR I=1 TO N
900 IF O(I,Q+1)>0 THEN B(I,P+1)=0
910 NEXT I
920 FOR I=1 TO S1
930 IF X(I)=0 THEN GOTO 1030
940 FOR J=1 TO N
950 S=INT (L/2^(J-1))
960 IF (S/2)<>(INT(S/2)) THEN T1=1 ELSE T1=0
970 IF O(J,G(I))=T1 THEN O(J,G(I))=0 ELSE O(J,G(I))=1
980 NEXT J:S=0
990 FOR J1=1 TO N
1000 S=S+O(J1,G(I))*2^(J1-1)
1010 NEXT J1
1020 D(S)=0
1030 NEXT I
1040 FOR I=N TO 1 STEP -1
1050 S=-1
1060 FOR J=1 TO N
1070 IF S<B(J,P+1) THEN S1=J
1080 IF S<B(J,P+1) THEN S=B(J,P+1)
1090 NEXT J
1100 A(I)=S1
1110 B(S1,P+1)=-2
1120 REM PRINT "a("I")="A(I),
1130 NEXT I:PRINT
1140 Z(0)=L:E=0
1150 FOR I=1 TO N
1160 F=E:V=0
1170 FOR J=0 TO F
1180 S=INT(Z(J)/2^(A(I)-1))
1190 IF S/2<>INT(S/2)THEN T1=1 ELSE T1=0
1200 Y=Z(J)+((-1)^T1)*2^(A(I)-1)
1210 IF D(Y)=2 THEN P(A(I))=0
1220 IF D(Y)=2 THEN E=E-V
1230 IF D(Y)=2 THEN GOTO 1280
1240 V=V+1:E=E+1:Z(E)=Y