main() { Put0(); while(1){ if(Input()==0) break; Search(); Output(); Put0(); } }
void Put1a(int op, int a, int b, int im) { //same as Put1, but with range test -0x10000H <= im < 0x10000 IF (im >= -0x10000) && (im <= 0x0FFFF) THEN Put1(op, a, b, im); ELSE Put1(Mov+U, RH, 0, im >> 16); IF (im & 0xFFFF) != 0 THEN Put1(Ior, RH, RH, im & 0xFFFF); END Put0(op, a, b, RH); END }
void Search(void){ int i,j,present=1,k,num_checked=1; int out=0; for(i=2;;i++){ Put0(); chk[1]=1; present=1; num_checked=1; while(num_checked!=n-1){ for(k=0;k<i;k++){ present++; if(present>n){ for(j=1;;j++) if(chk[j]==0) break; present=j; } if(chk[present]==1){ k--; continue; } } if(present==2){ out=1; break; } chk[present]=1; num_checked++; } if(out==0) break; else out=0; } m=i; return; }