program Hrm_RaP;{zMar 8 08/12/2024}
label
0,1,2,3,G1,G2,G3,G4,G5,G6,Sk1,SLb,SLs;
type
DHc=array [0..399]of char;
Int=array [0..399]of integer;
DHv=array [0..399]of real;
MGC=array [0..399,0..399]of real;
GCI=array [0..399,0..399]of char;
In2=array [0..399,0..399]of integer;
var
Hs,Vd:String;
Pm,TNo:String[6];Ms,Ssn:String[4];
Sp1,Sp2,SN1,SN2,oE:String[3];
i,j,k,H,L,b,Mi,Si,Oi,h1,h2,h1o,h2o,Wd,Fr,
Er,Me,wt,x,y,z,u,v,m1,Ct,o,u0,v0,Hr,Dy,Mt
,Yr,sM,sY,Ya,Yo,Yl,Yn,Mn,Dn,Hn,Hi,Sn,xy,
e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,
aST,nD,za,Ho,Min,Po,Ns,zu,z0,zr,Pi,zP,kP,
zF,xS,xP,yW,yP,xG,m2,kT,kR,pT,Sk,kz,An,Xj
,oEo,k1,k2,k3,Cw,Sj,rL,St,oH,Rw,kL,kD,Dr,
jL,iL:integer;
r,WgP,mc,mr,r1:real;
a,Sc,Oc,Mar,SAc,OAc,Sf,Md,c1,c3,s1,s2,s3,
s4,u1,u2,u3,u4,Ii,Id,Ih,Ie,Is,B1,B2,uv,Pp
,Pe,sD,Al,vh,vb,Gn,Cs,Oo,Ip,Xx,Co,Pw,on,
Zz,Yy,Aa,ET,Cl,nr,Rr,Ed,B0,T0,He,Te,Se,Ae
,Re,PmL,oa,ci,op:char;
Db,De,Hb,Be,Hel,Bb,BDc,PN,Bei,Hol,BMc,DCe
,I1,I2,I3,I4,I5,I6,I7,I8,AEl,FSi,Mli
:DHc;
Ds,Bs,Es,Eg,Ec,G,C,G0,C0,S,Sa,Q,Bg,Bc,Ig,
Ic,Fs,IgC,IcC,RBc,RBg,RBd,RBP,So,e,eE,Ts,
ABs,En0,En,Es0,EcT,EcR,Wg,ETx,eW,RBo,RBs,
RBm,RBr,TsS,TsM,Bso,TmR,RBa,TsA:DHv;
Hp,Ng,Nc,T1,T2,T3,Ml,Bp,Ba,Ep,F0,Ro,Rn,Wn
,Wh,La,Pc,Lo,Xw,Bo,Qo,D0,D1,D2,D3,SL0,SL2
:Int;
SLn,SLf:In2;
M,N,Na,No,Nh,Nha,D,Rp,Ap:MGC;
BR,SL,DSt:GCI;
Begin Readln(op);Read(Ii);for i:=
1to 35do Read(a);Read(ci);Readln(Ct);
for i:=1to 41do Write('_');Writeln;
if Ii='.'then begin
for i:=1to Ct do begin
Read(k);T1[i]:=k end;Readln;
for i:=1to Ct do begin
Read(k);T2[i]:=k end;Readln;
for i:=1to Ct do begin
Read(k);Ml[i]:=k end;
for i:=1to Ct do begin
if(T1[i]>8)and(T1[i]<16)then
T1[i]:=T1[i]-8;if T1[i]=16then T1[i]:=8;
if T1[i]>16then T1[i]:=T1[i]-16;
if(T2[i]>8)and(T2[i]<16)then
T2[i]:=T2[i]-8;if T2[i]=16then T2[i]:=8;
if T2[i]>16then T2[i]:=T2[i]-16;
if(Ml[i]>6)and(Ml[i]<12)then
Ml[i]:=Ml[i]-6;if Ml[i]=12then Ml[i]:=6;
if(Ml[i]>12)and(Ml[i]<18)then
Ml[i]:=Ml[i]-12;if Ml[i]=18then Ml[i]:=6;
if Ml[i]>18then Ml[i]:=Ml[i]-18 end end;
i:=0;k:=1;if Ii='^'then begin
while k>0 do begin Read(k);i:=i+1;
T3[i]:=k end;Ct:=i-1 end;Readln(Dr);
for i:=1to Dr-1do Readln;
for i:=1to 2do begin
Read(D1[i]);D1[i]:=D1[i]*100;
Read(D2[i]);D2[i]:=D2[i]*10;
Read(D3[i]);if D3[i]=7then D3[i]:=1 end;
for i:=1to 2do D0[i]:=D1[i]+D2[i]+D3[i];
k:=1;while k>0 do Readln(k);
Read(Cl,a,a,a,sD,a,aST);
for i:=1to 15do Read(a);Read(PmL,a,a,a);
Readln(Co,a,a,a,a,a,Cs,a,a,a,a,a,a,Gn);
Read(Id,a,a,Ip);for i:=1to 19do Read(a);
Readln(ET,Zz,on,a,Is,a,oa,a,Ih,a,Md,a,
Ie,An);Readln(oE,Hr,a,Min,a,a,Dy,a,a,
Mt,a,a,Yr,a,Xx,Yy,nr,a,Rr,a,oEo,a,Pi);
Readln(Ns,a,a,Ssn,a,a,Pm,a,a,Sk,a,
a,a,Yy,a,Zz,a,Aa,a,Ed,a,SN1,a,SN2,k);
Read(a,a,TNo);for i:=1to 21do Read(a);
Readln(T0,a,a,Sp1,a,Sp2,a,B0);
for i:=1to 5 do Readln;
if Cs='r'then begin for
i:=1to 8do for j:=1to 8do SL[i,j]:=' ';
for i:=1to Ct do Rn[i]:=i;
j:=0;k:=1;while k>0 do begin
Read(k);j:=j+1;Wn[j]:=k;Cw:=j end;
if Wn[1]=0then Read(k);
Read(St);if St>0then begin
Readln;Readln;
j:=0;k:=1;while k>0 do begin
Read(k);j:=j+1;Wh[j]:=k end end end;
{S/D}Hr:=(Hr*100)+Min;
if Id='D'then begin
if sD='-'then aST:=aST+60;
if sD='+'then begin
aST:=60-aST;sD:='-'end end;
{IN CALENDAR Date Adj}
for za:=0to 1do begin
{MONTH START}if Yr=2024then begin
e1:=05116;e4:=15034;e7:=22586;e10:=04318;
e2:=16374;e5:=08225;e8:=09057;e11:=07497;
e3:=10215;e6:=12345;e9:=12277;e12:=00297
end;if Yr=2025then begin
e1:=11155;e4:=20454;e7:=04077;e10:=08488;
e2:=22113;e5:=13535;e8:=13587;e11:=12087;
e3:=16065;e6:=17555;e9:=16597;e12:=05077
end;if Yr=2026then begin
e1:=16245;e4:=02335;e7:=09557;e10:=14368;
e2:=04004;e5:=19415;e8:=19467;e11:=17577;
e3:=21555;e6:=23435;e9:=22487;e12:=10567
end;if Yr=2027then begin
e1:=22135;e4:=08225;e7:=15437;e10:=20258;
e2:=09504;e5:=01296;e8:=01348;e11:=23467;
e3:=03446;e6:=05316;e9:=04368;e12:=16467;
end;if Yr=2028then begin
e1:=04036;e4:=14114;e7:=21316;e10:=02148;
e2:=15404;e5:=07185;e8:=07227;e11:=05367;
e3:=09335;e6:=11195;e9:=10247;e12:=22356;
end;if Yr=2029then begin
e1:=09525;e4:=20004;e7:=30197;e10:=08038;
e2:=21293;e5:=13065;e8:=13107;e11:=11257;
e3:=15225;e6:=17075;e9:=16137;e12:=04257;
end;if Yr=2030then begin
e1:=15425;e4:=01485;e7:=09077;e10:=13518;
e2:=03184;e5:=18555;e8:=18587;e11:=17147;
e3:=21125;e6:=22555;e9:=22017;e12:=10147;
end;if Yr=2031then begin
e1:=21325;e4:=07375;e7:=14557;e10:=19408;
e2:=09084;e5:=00436;e8:=00468;e11:=23037;
e3:=03016;e6:=04436;e9:=03498;e12:=16037;
end;if Yr=2032then begin
e1:=03216;e4:=13264;e7:=20436;e10:=10298;
e2:=14584;e5:=06315;e8:=06347;e11:=04527;
e3:=08505;e6:=10315;e9:=09387;e12:=21536;
end;if Yr=2033then begin
e1:=09115;e4:=19154;e7:=02307;e10:=07188;
e2:=20473;e5:=12205;e8:=12227;e11:=10417;
e3:=14395;e6:=16195;e9:=15267;e12:=03437;
end;if Yr=2034then begin
e1:=15005;e4:=10035;e7:=08187;e10:=13068;
e2:=02364;e5:=18085;e8:=18107;e11:=16307;
e3:=20295;e6:=22075;e9:=21147;e12:=09327;
end;if Yr=2035then begin
e1:=20505;e4:=06525;e7:=14067;e10:=18558;
e2:=08264;e5:=23575;e8:=23577;e11:=22197;
e3:=02176;e6:=03556;e9:=03038;e12:=15217;
end;if Yr=2036then begin
e1:=02396;e4:=12414;e7:=19546;e10:=00448;
e2:=14164;e5:=05455;e8:=05467;e11:=04097;
e3:=08075;e6:=09435;e9:=08517;e12:=21116;
end;if Yr=2037then begin
e1:=08295;e4:=18304;e7:=01427;e10:=06328;
e2:=20053;e5:=11335;e8:=11347;e11:=09587;
e3:=13565;e6:=15315;e9:=14397;e12:=03007;
end;if Yr=2038then begin
e1:=14195;e4:=00195;e7:=07307;e10:=12218;
e2:=01544;e5:=17225;e8:=17227;e11:=15477;
e3:=19465;e6:=21195;e9:=20277;e12:=08507;
end;if Yr=2039then begin
e1:=20085;e4:=06085;e7:=13187;e10:=18098;
e2:=07444;e5:=23105;e8:=23097;e11:=21367;
e3:=01346;e6:=03076;e9:=20168;e12:=14397;
end;if Yr=2040then begin
e1:=01586;e4:=11574;e7:=19066;e10:=23587;
e2:=13344;e5:=04585;e8:=04587;e11:=03267;
e3:=07245;e6:=08555;e9:=08047;e12:=20286;
end;if Yr=2041then begin
e1:=07475;e4:=17464;e7:=00547;e10:=05478;
e2:=19233;e5:=10475;e8:=10467;e11:=09157;
e3:=13135;e6:=14435;e9:=13527;e12:=02187;
end;if Yr=2042then begin
e1:=13375;e4:=23344;e7:=06427;e10:=11368;
e2:=01124;e5:=16355;e8:=16347;e11:=15047;
e3:=19025;e6:=20315;e9:=19407;e12:=08077;
end;if Yr=2043then begin
e1:=19265;e4:=05235;e7:=12297;e10:=17248;
e2:=07024;e5:=22245;e8:=22217;e11:=20537;
e3:=00516;e6:=02196;e9:=01298;e12:=13577;
end;case(Mt)of
1:xy:=e1;5:xy:=e5;9:xy:=e9;
2:xy:=e2;6:xy:=e6;10:xy:=e10;
3:xy:=e3;7:xy:=e7;11:xy:=e11;
4:xy:=e4;8:xy:=e8;12:xy:=e12 end;
k:=0;while xy>=10 do begin
k:=k+1;xy:=xy-10 end;x:=xy;y:=k;
sM:=0;
if(Dy<x)or((Dy=x)and(Hr<=y))then sM:=1;
if((Mt=2)and(sM=0))or(Mt>2)then sY:=0
else sY:=1;
{CALENDAR CONVERSION}
Db[8]:='W';Db[6]:='W';Db[5]:='w';
Db[4]:='a';Db[2]:='a';Db[1]:='l';
if(Yr>=1984)and(Yr<2044)then begin
Db[7]:='W';Db[3]:='g';Yo:=1984 end;
Ya:=Yr-Yo;while Ya>60do Ya:=Ya-60;
if sY=0 then Yn:=(Yr-Yo)+1 else
Yn:=Yr-Yo;while Yn>60 do Yn:=Yn-60;
Mn:=(Ya*12)+Mt-sM;
while Mn>60do Mn:=Mn-60;
Yl:=Ya;k:=0;while Yl>=4do begin
k:=k+1;Yl:=Yl-4 end;if Yl>0then
k:=k+1;if(Yl=0)and(Ya>0)then k:=k+1;
Dn:=(Ya*365)+k;case(Mt)of
1:j:=0; 4:j:=90; 7:j:=181;10:j:=273;
2:j:=31;5:j:=120;8:j:=212;11:j:=304;
3:j:=59;6:j:=151;9:j:=243;12:j:=334 end;
if(Yl=0)and(Mt=2)then j:=j-1;
Dn:=Dn+j+Dy-1;while Dn>=60do Dn:=Dn-60;
if (Hr>=0) and(Hr<100) then Hi:=0;
if (Hr>=100) and(Hr<300) then Hi:=1;
if (Hr>=300) and(Hr<500) then Hi:=2;
if (Hr>=500) and(Hr<700) then Hi:=3;
if (Hr>=700) and(Hr<900) then Hi:=4;
if (Hr>=900) and(Hr<1100)then Hi:=5;
if (Hr>=1100)and(Hr<1300)then Hi:=6;
if (Hr>=1300)and(Hr<1500)then Hi:=7;
if (Hr>=1500)and(Hr<1700)then Hi:=8;
if (Hr>=1700)and(Hr<1900)then Hi:=9;
if (Hr>=1900)and(Hr<2100)then Hi:=10;
if (Hr>=2100)and(Hr<2300)then Hi:=11;
if (Hr>=2300)and(Hr<2400)then Hi:=12;
Hn:=(Dn*12)+Hi;while Hn>=60do Hn:=Hn-60;
for i:=1to 4do begin case(i)of
1:j:=5;2:j:=6;3:j:=7;4:j:=8 end;case(i)of
1:Sn:=Yn;2:Sn:=Mn;3:Sn:=Dn;4:Sn:=Hn end;
z:=0; 0:repeat
if(Db[i]='a')or(Db[i]='c')or(Db[i]='e')
or(Db[i]='g')or(Db[i]='i')or(Db[i]='k')
then Pp:='+'else Pp:='-';
if Sn>0then begin
if Pp='-'then case(Db[j])of
'W':Db[j]:='F';'F':Db[j]:='E';
'E':Db[j]:='M';'M':Db[j]:='w';
'w':Db[j]:='W'end;
case(Db[i])of
'a':Db[i]:='b';'g':Db[i]:='h';
'b':Db[i]:='c';'h':Db[i]:='i';
'c':Db[i]:='d';'i':Db[i]:='j';
'd':Db[i]:='e';'j':Db[i]:='k';
'e':Db[i]:='f';'k':Db[i]:='l';
'f':Db[i]:='g';'l':Db[i]:='a'end end;
z:=z+1;until(Sn=0)or(z=Sn)end;
if za=0 then begin
{DATE ADJUSTMENT & Output}k:=0;
if(Yl=0)and(Mt=2)then k:=1;case(Mt)of
1:nD:=31+k;5:nD:=31+k; 9:nD:=30+k;
2:nD:=28+k;6:nD:=30+k;10:nD:=31+k;
3:nD:=31+k;7:nD:=31+k;11:nD:=30+k;
4:nD:=30+k;8:nD:=31+k;12:nD:=31+k end;
Write(' ',Ih,Cl,Ie,'(',Xx,') ');
if aST>99then Write(aST,sD)
else Write(' ',aST,sD);
Write('(');if Hr<9then Write('000',Hr);
if(Hr<99)and(Hr>9)then Write('00',Hr);
if(Hr<999)and(Hr>99)then Write('0',Hr);
if Hr>999then Write(Hr);Write(') (');
if Dy>9then Write(Dy,')')
else Write('0',Dy,')');Write(' ');
if Mt>9then Write(Mt,' ')else
Write('0',Mt,' ');Writeln(Yr);
k:=0;while Hr>=100do begin
k:=k+1;Hr:=Hr-100 end;Hr:=(60*k)+Hr;
if sD='+'then begin Hr:=Hr+aST;
if Hr>1440then begin Hr:=Hr-1440;
if Dy=nD then Dy:=1 else Dy:=Dy+1;
if Dy=1then if Mt=12then
Mt:=1 else Mt:=Mt+1;
if(Mt=1)and(Dy=1)then Yr:=Yr+1 end end;
if sD='-'then begin Hr:=Hr-aST;
if Hr<0then begin if aST<=60then
Hr:=(60-(Hr-(Hr*2)))+1380;if aST>60then
Hr:=(120-(Hr-(Hr*2)))+1320;
if Dy=1then Dy:=nD else Dy:=Dy-1;
if Dy=nD then if Mt=1then
Mt:=12 else Mt:=Mt-1;
if(Mt=12)and(Dy=nD)then Yr:=Yr-1 end end;
k:=0;while Hr>=60do begin
k:=k+1;Hr:=Hr-60 end;Hr:=(100*k)+Hr end;
if za=1then begin
{HOUR/MONTH Change/Al/Ho MONITOR Output}
Ho:=Hr;k:=0;while Ho>=100do begin
k:=k+1;Ho:=Ho-100 end;Ho:=(60*k)+Ho;
case(Hi)of 0:Ho:=60-Ho;
1:Ho:=180-Ho;7:Ho:= 900-Ho;
2:Ho:=300-Ho;8:Ho:=1020-Ho;
3:Ho:=420-Ho;9:Ho:=1140-Ho;
4:Ho:=540-Ho;10:Ho:=1260-Ho;
5:Ho:=660-Ho;11:Ho:=1380-Ho;
6:Ho:=780-Ho;12:Ho:=1440-Ho end;
if((Ho>=0)and(Ho<10))
or((Ho>=110)and(Ho<120))then Po:=0;
if((Ho>10)and(Ho<=20))
or((Ho>=100)and(Ho<110))then Po:=1;
if((Ho>20)and(Ho<=30))
or((Ho>=90)and(Ho<100))then Po:=2;
if((Ho>30)and(Ho<=40))
or((Ho>=80)and(Ho<90))then Po:=3;
if((Ho>40)and(Ho<=50))
or((Ho>=70)and(Ho<80))then Po:=4;
if((Ho>50)and(Ho<=60))
or((Ho>=60)and(Ho<70))then Po:=5;
case(Hi)of 0:Al:='a';
1:Al:='b';5:Al:='f'; 9:Al:='j';
2:Al:='c';6:Al:='g';10:Al:='k';
3:Al:='d';7:Al:='h';11:Al:='l';
4:Al:='e';8:Al:='i';12:Al:='a'end;
Write(' (');if Ho<10then Write('00',Ho);
if(Ho<100)and(Ho>9)then Write('0',Ho);
if Ho>99then Write(Ho);
Write(')',Al,' ');
if y<10then Write('000',y);
if(y<100)and(y>9)then Write('00',y);
if(y<1000)and(y>99)then Write('0',y);
if y>999then Write(y);
Write('(');if Hr<=9then Write('000',Hr);
if(Hr<99)and(Hr>9)then Write('00',Hr);
if(Hr<999)and(Hr>99)then Write('0',Hr);
if Hr>999then Write(Hr);
Write(') ',x,'(');
if Dy>9then Write(Dy,')')
else Write('0',Dy,')');Write(' ');
if Mt>9then Write(Mt,' ')else
Write('0',Mt,' ');Writeln(Yr);Writeln(
' ',Db[8],' ',' ',
Db[7],Db[3],' ',Db[6],Db[2],' ',
Db[5],Db[1]);Writeln end {za} end;
vh:=Db[7];vb:=Db[3];
if(vh='W')and((vb='a')or(vb='b'))
or(vh='F')and((vb='c')or(vb='d'))
or(vh='E')and((vb='e')or(vb='f'))
or(vh='M')and((vb='g')or(vb='h'))
or(vh='w')and((vb='i')or(vb='j'))
then Vd:=('kl');
if(vh='W')and((vb='k')or(vb='l'))
or(vh='F')and((vb='a')or(vb='b'))
or(vh='E')and((vb='c')or(vb='d'))
or(vh='M')and((vb='e')or(vb='f'))
or(vh='w')and((vb='g')or(vb='h'))
then Vd:=('ij');
if(vh='W')and((vb='i')or(vb='j'))
or(vh='F')and((vb='k')or(vb='l'))
or(vh='E')and((vb='a')or(vb='b'))
or(vh='M')and((vb='c')or(vb='d'))
or(vh='w')and((vb='e')or(vb='f'))
then Vd:=('gh');
if(vh='W')and((vb='g')or(vb='h'))
or(vh='F')and((vb='i')or(vb='j'))
or(vh='E')and((vb='k')or(vb='l'))
or(vh='M')and((vb='a')or(vb='b'))
or(vh='w')and((vb='c')or(vb='d'))
then Vd:=('ef');
if(vh='W')and((vb='e')or(vb='f'))
or(vh='F')and((vb='g')or(vb='h'))
or(vh='E')and((vb='i')or(vb='j'))
or(vh='M')and((vb='k')or(vb='l'))
or(vh='w')and((vb='a')or(vb='b'))
then Vd:=('cd');
if(vh='W')and((vb='c')or(vb='d'))
or(vh='F')and((vb='e')or(vb='f'))
or(vh='E')and((vb='g')or(vb='h'))
or(vh='M')and((vb='i')or(vb='j'))
or(vh='w')and((vb='k')or(vb='l'))
then Vd:=('ab');
{zr LOOPS}
for i:=0to b do ABs[i]:=0;
for i:=1to 10do Wg[i]:=0;
for i:=1to 27 do begin
SL0[i]:=0;SL2[i]:=0 end;
z:=0;z0:=0;zP:=0; 1:repeat
for i:=1to 5do Wg[i]:=0;
zr:=0; 2:repeat zr:=zr+1;
{Xx MODES}
if Xx='t'then begin zu:=3;case(zr)of
1:oEo:=7;2:oEo:=0;3:oEo:=8 end end;
if Xx='d'then begin zu:=2;
case(zr)of 1:oEo:=7;2:oEo:=0 end end;
if Xx='s'then zu:=1;
case(oEo)of 0:Ms:='nEo';
1:Ms:='nTr';4:Ms:='zTs';7:Ms:='nMm';
2:Ms:='zTr';5:Ms:='nMr';8:Ms:='zMm';
3:Ms:='nTs';6:Ms:='zMr';9:Ms:='nEr'end;
on:=Ms[1];ET:=Ms[2];Gn:=Ms[3];
case(Pi)of-1:Pi:=161;-2:Pi:=314;
-3:Pi:=809;-4:Pi:=1618;-5:Pi:=3141;
-6:Pi:=8090;-7:Pi:=16180;-8:Pi:=31415;
-9:Pi:=32767 end;
if on='z'then oE[1]:='z';
if ET='T'then oE[2]:=' 'else oE[2]:=ET;
if Gn='r'then oE[3]:=' 'else oE[3]:=Gn;
{I1-I8 Loop Ind}
if Ih='_'then I1[zr]:=' 'else I1[zr]:=Ih;
if Cl='_'then I2[zr]:=' 'else I2[zr]:=Cl;
if Ie='*'then I3[zr]:=' 'else I3[zr]:=Ie;
if on='z'then
I4[zr]:='z'else I4[zr]:=' ';
if ET='T'then I5[zr]:=' 'else I5[zr]:=ET;
if Gn='r'then I6[zr]:=' 'else I6[zr]:=Gn;
if oa='.'then
I7[zr]:=' 'else I7[zr]:=':';
I8[zr]:='?';case(Pi)of 1:I8[zr]:=' ';
161:I8[zr]:='!';8090:I8[zr]:='(';
314:I8[zr]:='|';16180:I8[zr]:=')';
809:I8[zr]:='/';31415:I8[zr]:='^';
1618:I8[zr]:='<';32767:I8[zr]:='*';
3141:I8[zr]:='>'end;
mc:=30;if(on='z')or(ET='E')then mc:=10;
mr:=10;if Pi=1then mc:=10;
if Ii='.'then begin L:=Ml[z+1];
H:=(T1[z+1]*10)+T2[z+1];o:=(H*10)+L end;
if Ii='^'then begin o:=T3[z+1];
if o=0then goto G1;L:=o;k:=0;
while L>=10do begin k:=k+1;L:=L-10 end;
H:=k;L:=o-(H*10)end;
if zr=zu then begin
FSi[z+1]:='_';Qo[z+1]:=0;
if(o=D0[1])then begin D0[1]:=Rn[z+1];Qo
[z+1]:=1;if op='o'then FSi[z+1]:='^'end;
if(o=D0[2])then begin D0[2]:=Rn[z+1];Qo
[z+1]:=2;if op='o'then FSi[z+1]:=':'end;
end;case(o)of
666:oH:=1;766:oH:=5;
661:oH:=2;761:oH:=6;
676:oH:=3;776:oH:=7;
671:oH:=4;771:oH:=8 end;Lo[z+1]:=o;
Bo[1]:=1;Bo[3]:=4;Bo[5]:=10;Bo[7]:=13;
Bo[2]:=2;Bo[4]:=5;Bo[6]:=11;Bo[8]:=14;
{Mi}case(L)of 1:Mi:=1;2:Mi:=2;
3:Mi:=3;4:Mi:=4;5:Mi:=5;6:Mi:=6 end;
{Hrm DEF:11 - 88}Hb[0]:=' ';case(H)of
11:Hs:='acegik oo bbbhhh 6 00 00 7 M';
12:Hs:='aceljh fo bbbiik 5 21 00 8 E';
13:Hs:='acejhf oo bbbkik 3 00 00 7 M';
14:Hs:='acegik oo bbbbjf 4 00 00 7 E';
15:Hs:='acehfd jo bbbgaa 1 31 00 8 W';
16:Hs:='aceika fo bbblld 4 21 00 8 E';
17:Hs:='acekac gi bbbjfj 2 21 31 9 E';
18:Hs:='aceblj fo bbbgkc 3 21 00 8 E';
21:Hs:='fdbgik ao ccehhh 5 51 00 8 E';
22:Hs:='fdbljh oo cceiik 6 00 00 7 M';
23:Hs:='fdbjhf ao ccekik 4 50 00 8 E';
24:Hs:='fdbgik lo ccebjf 3 40 00 8 M';
25:Hs:='fdbhfd ia ccegaa 4 31 50 9 E';
26:Hs:='fdbika oo ccelld 1 00 00 7 w';
27:Hs:='fdbkac io ccejfj 3 31 00 8 E';
28:Hs:='fdbblj oo ccegkc 2 00 00 7 E';
31:Hs:='dblgik oo ecehhh 3 00 00 7 F';
32:Hs:='dblljh go eceiik 4 30 00 8 w';
33:Hs:='dbljhf oo ecekik 6 00 00 7 F';
34:Hs:='dblgik oo ecebjf 5 00 00 7 w';
35:Hs:='dblhfd jo ecegaa 2 30 00 8 W';
36:Hs:='dblika go ecelld 3 30 00 8 w';
37:Hs:='dblkac gi ecejfj 1 20 30 9 E';
38:Hs:='dblblj go ecegkc 4 30 00 8 w';
41:Hs:='acegik oo hdlhhh 4 00 00 7 W';
42:Hs:='aceljh go hdliik 3 40 00 8 W';
43:Hs:='acejhf oo hdlkik 5 00 00 7 W';
44:Hs:='acegik oo hdlbjf 6 00 00 7 W';
45:Hs:='acehfd jo hdlgaa 3 31 00 8 W';
46:Hs:='aceika go hdllld 2 30 00 8 w';
47:Hs:='acekac jf hdljfj 4 31 50 9 W';
48:Hs:='aceblj fo hdlgkc 1 21 00 8 E';
51:Hs:='bljgik co agghhh 1 21 00 8 M';
52:Hs:='bljljh cg aggiik 4 21 40 9 W';
53:Hs:='bljjhf do aggkik 2 10 00 8 F';
54:Hs:='bljgik co aggbjf 3 21 00 8 W';
55:Hs:='bljhfd oo agggaa 6 00 00 7 W';
56:Hs:='bljika cg agglld 5 21 40 9 W';
57:Hs:='bljkac fo aggjfj 3 50 00 8 W';
58:Hs:='bljblj cg agggkc 4 21 40 9 W';
61:Hs:='ceggik lo ffjhhh 4 30 00 8 F';
62:Hs:='cegljh oo ffjiik 1 00 00 7 M';
63:Hs:='cegjhf lo ffjkik 3 30 00 8 F';
64:Hs:='ceggik ao ffjbjf 2 10 00 8 W';
65:Hs:='ceghfd lj ffjgaa 5 30 41 9 F';
66:Hs:='cegika oo ffjlld 6 00 00 7 w';
67:Hs:='cegkac jo ffjjfj 4 41 00 8 F';
68:Hs:='cegblj oo ffjgkc 3 00 00 7 w';
71:Hs:='egigik ac dldhhh 2 10 20 9 M';
72:Hs:='egiljh do dldiik 3 20 00 8 M';
73:Hs:='egijhf dl dldkik 1 10 31 9 F';
74:Hs:='egigik dl dldbjf 4 20 40 9 M';
75:Hs:='egihfd ao dldgaa 3 50 00 8 E';
76:Hs:='egiika do dldlld 4 20 00 8 M';
77:Hs:='egikac oo dldjfj 6 00 00 7 E';
78:Hs:='egiblj do dldgkc 5 20 00 8 M';
81:Hs:='hfdgik ao aeihhh 3 10 00 8 M';
82:Hs:='hfdljh oo aeiiik 2 00 00 7 M';
83:Hs:='hfdjhf ao aeikik 4 10 00 8 M';
84:Hs:='hfdgik ao aeibjf 1 10 00 8 W';
85:Hs:='hfdhfd ai aeigaa 4 10 50 9 M';
86:Hs:='hfdika oo aeilld 3 00 00 7 E';
87:Hs:='hfdkac io aeijfj 5 50 00 8 M';
88:Hs:='hfdblj oo aeigkc 6 00 00 7 E'end;
for i:=1to 9do Hb[i]:=Hs[i];
Hb[7]:=Hs[L+10];
case(Hs[18])of
'1':Si:=1;'2':Si:=2;'3':Si:=3;
'4':Si:=4;'5':Si:=5;'6':Si:=6 end;
case(Hs[20])of
'0':h1:=0;'1':h1:=1;'2':h1:=2;
'3':h1:=3;'4':h1:=4;'5':h1:=5 end;
case(Hs[21])of '0':h1o:=0;'1':h1o:=1 end;
case(Hs[23])of
'0':h2:=0;'1':h2:=1;'2':h2:=2;
'3':h2:=3;'4':h2:=4;'5':h2:=5 end;
case(Hs[24])of '0':h2o:=0;'1':h2o:=1 end;
case(Hs[26])of
'7':b:=7;'8':b:=8;'9':b:=9 end;
Pe:=Hs[28];
{Oi}if Si<4then Oi:=Si+3 else Oi:=Si-3;
{Hel : Hid Elm label}
for i:=1to 6do Hel[i]:=' ';
for i:=1to 6do begin
if i=h1 then Hel[i]:=Hb[8];
if i=h2 then Hel[i]:=Hb[9] end;
{STRENGTH ALLOCATION: Q}
Q[1]:=1; {o >}Q[2]:=0.5;{<}
Q[3]:=0.25;{v }Q[4]:=0.1;{x}
{FOUR PILLARS Step: S}S[1]:=1;
S[2]:=1; S[3]:=5/6; S[4]:=4/6;
{FOUR PILLARS Date Strength}
for i:=1to 8do begin case(Db[i])of
'a':De[i]:='w';'b':De[i]:='E';
'c':De[i]:='W';'d':De[i]:='W';
'e':De[i]:='E';'f':De[i]:='F';
'g':De[i]:='F';'h':De[i]:='E';
'i':De[i]:='M';'j':De[i]:='M';
'k':De[i]:='E';'l':De[i]:='w';
'W':De[i]:='W';'F':De[i]:='F';
'E':De[i]:='E';'M':De[i]:='M';
'w':De[i]:='w'end end;
for i:=1to 8do for j:=1to 8do D[i,j]:=1;
D[1,2]:=S[2];D[2,1]:=S[2];D[3,1]:=S[3];
D[1,3]:=S[3];D[2,3]:=S[2];D[3,2]:=S[2];
D[1,4]:=S[4];D[2,4]:=S[3];D[3,4]:=S[2];
D[1,5]:=S[1];D[2,5]:=S[2];D[3,5]:=S[3];
D[1,6]:=S[2];D[2,6]:=S[1];D[3,6]:=S[2];
D[1,7]:=S[3];D[2,7]:=S[2];D[3,7]:=S[1];
D[1,8]:=S[4];D[2,8]:=S[3];D[3,8]:=S[2];
D[4,1]:=S[4];D[5,1]:=S[1];D[6,1]:=S[2];
D[4,2]:=S[3];D[5,2]:=S[2];D[6,2]:=S[1];
D[4,3]:=S[2];D[5,3]:=S[3];D[6,3]:=S[2];
D[4,5]:=S[4];D[5,4]:=S[4];D[6,4]:=S[3];
D[4,6]:=S[3];D[5,6]:=S[2];D[6,5]:=S[2];
D[4,7]:=S[2];D[5,7]:=S[3];D[6,7]:=S[2];
D[4,8]:=S[1];D[5,8]:=S[4];D[6,8]:=S[3];
D[7,1]:=S[3];D[8,1]:=S[4];
D[7,2]:=S[2];D[8,2]:=S[3];
D[7,3]:=S[1];D[8,3]:=S[2];
D[7,4]:=S[2];D[8,4]:=S[1];
D[7,5]:=S[3];D[8,5]:=S[4];
D[7,6]:=S[2];D[8,6]:=S[3];
D[7,8]:=S[2];D[8,7]:=S[2];
for i:=1to 8do Ds[i]:=0;
for i:=1to 8do for j:=1to 8do
if(i>j)or(i<j)then begin
if De[i]='W'then case(De[j])of
'w':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
'W':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
'F':Ds[i]:=Ds[i]+(D[i,j]*Q[2]);
'E':Ds[i]:=Ds[i]+(D[i,j]*Q[3]);
'M':Ds[i]:=Ds[i]+(D[i,j]*Q[4])end;
if De[i]='F'then case(De[j])of
'W':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
'F':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
'E':Ds[i]:=Ds[i]+(D[i,j]*Q[2]);
'M':Ds[i]:=Ds[i]+(D[i,j]*Q[3]);
'w':Ds[i]:=Ds[i]+(D[i,j]*Q[4])end;
if De[i]='E'then case(De[j])of
'F':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
'M':Ds[i]:=Ds[i]+(D[i,j]*Q[2]);
'w':Ds[i]:=Ds[i]+(D[i,j]*Q[3]);
'W':Ds[i]:=Ds[i]+(D[i,j]*Q[4])end;
if(De[i]='E')and(De[j]='E')then begin
if(Db[i]='b')and(Db[j]='h')or
(Db[i]='h')and(Db[j]='b')or
(Db[i]='e')and(Db[j]='k')or
(Db[i]='k')and(Db[j]='e')then
Ds[i]:=Ds[i]+(D[i,j]*Q[4])else
Ds[i]:=Ds[i]+(D[i,j]*Q[1])end;
if De[i]='M'then case(De[j])of
'E':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
'M':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
'w':Ds[i]:=Ds[i]+(D[i,j]*Q[2]);
'W':Ds[i]:=Ds[i]+(D[i,j]*Q[3]);
'F':Ds[i]:=Ds[i]+(D[i,j]*Q[4])end;
if De[i]='w'then case (De[j])of
'M':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
'w':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
'W':Ds[i]:=Ds[i]+(D[i,j]*Q[2]);
'F':Ds[i]:=Ds[i]+(D[i,j]*Q[3]);
'E':Ds[i]:=Ds[i]+(D[i,j]*Q[4])end end;
for i:=1to 8do begin
if i=5then Ds[i]:=Ds[i]*(4/5)*(2/3);
if i=1then Ds[i]:=Ds[i]*(4/5);
if i=6then Ds[i]:=Ds[i]{*4/3}*(2/3);
if i=2then Ds[i]:=Ds[i]*(4/3);
if i=7then Ds[i]:=Ds[i]*(2/3);
if i=8then Ds[i]:=Ds[i]*(7/10)*(3/6);
if i=4then Ds[i]:=Ds[i]*(7/10);
if Db[i]='o'then Ds[i]:=0 end;
{Hrm branches Date strg}Be[0]:=' ';
for i:=1to b do begin case(Hb[i])of
'a':Be[i]:='w';'b':Be[i]:='E';
'c':Be[i]:='W';'d':Be[i]:='W';
'e':Be[i]:='E';'f':Be[i]:='F';
'g':Be[i]:='F';'h':Be[i]:='E';
'i':Be[i]:='M';'j':Be[i]:='M';
'k':Be[i]:='E';'l':Be[i]:='w'end end;
for i:=1to b do for j:=1to 8do M[i,j]:=0;
for i:=1to b do for j:=1to 8do begin
if Be[i]='W'then case(De[j])of
'w':M[i,j]:=Q[1];'W':M[i,j]:=Q[1];
'F':M[i,j]:=Q[2];'E':M[i,j]:=Q[3];
'M':M[i,j]:=Q[4]end;
if Be[i]='F'then case(De[j])of
'W':M[i,j]:=Q[1];'F':M[i,j]:=Q[1];
'E':M[i,j]:=Q[2];'M':M[i,j]:=Q[3];
'w':M[i,j]:=Q[4]end;
if Be[i]='E'then case(De[j])of
'F':M[i,j]:=Q[1];'M':M[i,j]:=Q[2];
'w':M[i,j]:=Q[3];'W':M[i,j]:=Q[4]end;
if(Be[i]='E')and(De[j]='E')then begin
if(Hb[i]='b')and(Db[j]='h')or
(Hb[i]='h')and(Db[j]='b')or
(Hb[i]='e')and(Db[j]='k')or
(Hb[i]='k')and(Db[j]='e')then
M[i,j]:=Q[4]else M[i,j]:=Q[1]end;
if Be[i]='M'then case(De[j])of
'E':M[i,j]:=Q[1];'M':M[i,j]:=Q[1];
'w':M[i,j]:=Q[2];'W':M[i,j]:=Q[3];
'F':M[i,j]:=Q[4]end;
if Be[i]='w'then case(De[j])of
'M':M[i,j]:=Q[1];'w':M[i,j]:=Q[1];
'W':M[i,j]:=Q[2];'F':M[i,j]:=Q[3];
'E':M[i,j]:=Q[4]end end;
{Bs}for i:=1to 19do Bs[i]:=0;
for i:=1to b do for j:=1to 8do
begin Bs[i]:=Bs[i]+(Ds[j]*M[i,j])end;
{Bs %}Bs[0]:=0;for i:=1to b do
Bs[0]:=Bs[0]+Bs[i];for i:=1to b do
Bs[i]:=((Bs[i]*100)/Bs[0])/100;Pw:='_';
{Elm order by Self pos - 3}
if Be[Si]='W'then begin
Wd:=3; Fr:=4;Er:=5;Me:=1;wt:=2 end;
if Be[Si]='F'then begin
Wd:=2; Fr:=3;Er:=4;Me:=5;wt:=1 end;
if Be[Si]='E'then begin
Wd:=1; Fr:=2;Er:=3;Me:=4;wt:=5 end;
if Be[Si]='M'then begin
Wd:=5; Fr:=1;Er:=2;Me:=3;wt:=4 end;
if Be[Si]='w' then begin
Wd:=4; Fr:=5;Er:=1;Me:=2;wt:=3 end;
{Bp : Brch pos/no in Elm spread/SELF}
for i:=1to b do case(Be[i])of
'W':Bp[i]:=Wd;'F':Bp[i]:=Fr;
'E':Bp[i]:=Er;'M':Bp[i]:=Me;
'w':Bp[i]:=wt end;
{Bp : Brch pos/no in Elm spread/Ts}
for i:=1to b do case(Be[i])of
'W':Ep[i]:=1;'F':Ep[i]:=2;
'E':Ep[i]:=3;'M':Ep[i]:=4;
'w':Ep[i]:=5 end;
{BR : Bch/Bch relation}
Be[b+9]:='W';Be[b+10]:='F';Be[b+11]:='E';
Be[b+12]:='M';Be[b+13]:='w';
for i:=0to b+8+5do for j:=0to b+8+5do
BR[i,j]:=' ';for i:=1to 8do begin
Be[b+i]:=De[i];Hb[b+i]:=Db[i] end;
for i:=0to b+8+5do for j:=0to b+8+5do
begin if(Be[i]=' ')or(Be[j]=' ')then
BR[i,j]:=' ';
if Be[i]='W'then case(Be[j])of
'W':BR[i,j]:='o';'F':BR[i,j]:='<';
'E':BR[i,j]:='v';'M':BR[i,j]:='x';
'w':BR[i,j]:='>'end;
if Be[i]='F'then case(Be[j])of
'W':BR[i,j]:='>';'F':BR[i,j]:='o';
'E':BR[i,j]:='<';'M':BR[i,j]:='v';
'w':BR[i,j]:='x'end;
if Be[i]='E'then case(Be[j])of
'W':BR[i,j]:='x';'F':BR[i,j]:='>';
'M':BR[i,j]:='<';'w':BR[i,j]:='v'end;
if(Be[i]='E')and(Be[j]='E')then begin
if(Hb[i]='b')and(Hb[j]='h')or
(Hb[i]='h')and(Hb[j]='b')or
(Hb[i]='e')and(Hb[j]='k')or
(Hb[i]='k')and(Hb[j]='e')then
BR[i,j]:='*'else BR[i,j]:='o';
if Hb[i]=Hb[j]then BR[i,j]:='O'end;
if Be[i]='M'then case(Be[j])of
'W':BR[i,j]:='v';'F':BR[i,j]:='x';
'E':BR[i,j]:='>';'M':BR[i,j]:='o';
'w':BR[i,j]:='<'end;
if Be[i]='w'then case(Be[j])of
'W':BR[i,j]:='<';'F':BR[i,j]:='v';
'E':BR[i,j]:='x';'M':BR[i,j]:='>';
'w':BR[i,j]:='o'end end;
{Bb : Branch bind to Date}
for i:=0to b do Bb[i]:=' ';
for j:=1to 4do for i:=1to b do
if(Hb[i]='a')and(Db[j]='b')or
(Hb[i]='b')and(Db[j]='a')or
(Hb[i]='c')and(Db[j]='l')or
(Hb[i]='l')and(Db[j]='c')or
(Hb[i]='d')and(Db[j]='k')or
(Hb[i]='k')and(Db[j]='d')or
(Hb[i]='e')and(Db[j]='j')or
(Hb[i]='j')and(Db[j]='e')or
(Hb[i]='f')and(Db[j]='i')or
(Hb[i]='i')and(Db[j]='f')or
(Hb[i]='g')and(Db[j]='h')or
(Hb[i]='h')and(Db[j]='g')then
Bb[i]:='~';
{ACTIVE Line}for i:=1to 9do La[i]:=0;
for i:=1to b do
if((h1=Mi)and(i=8))or((h2=Mi)and(i=9))
or(i=Mi)or(i=7)then La[i]:=1;
{DAY CLASH : Active line - BDc}
for i:=1to b do BDc[i]:=' ';
for i:=1to b do
if(Hb[i]='a')and(Db[3]='g')or
(Hb[i]='b')and(Db[3]='h')or
(Hb[i]='c')and(Db[3]='i')or
(Hb[i]='d')and(Db[3]='j')or
(Hb[i]='e')and(Db[3]='k')or
(Hb[i]='f')and(Db[3]='l')or
(Hb[i]='g')and(Db[3]='a')or
(Hb[i]='h')and(Db[3]='b')or
(Hb[i]='i')and(Db[3]='c')or
(Hb[i]='j')and(Db[3]='d')or
(Hb[i]='k')and(Db[3]='e')or
(Hb[i]='l')and(Db[3]='f')then
BDc[i]:='|';
{BRANCH CLASHED by Act line : BMc/DCe}
for i:=1to b do begin
BMc[i]:=' ';DCe[i]:=' ' end;
for i:=1to b do for j:=1to b do
if(Hb[i]='a')and(Hb[j]='g')or
(Hb[i]='b')and(Hb[j]='h')or
(Hb[i]='c')and(Hb[j]='i')or
(Hb[i]='d')and(Hb[j]='j')or
(Hb[i]='e')and(Hb[j]='k')or
(Hb[i]='f')and(Hb[j]='l')or
(Hb[i]='g')and(Hb[j]='a')or
(Hb[i]='h')and(Hb[j]='b')or
(Hb[i]='i')and(Hb[j]='c')or
(Hb[i]='j')and(Hb[j]='d')or
(Hb[i]='k')and(Hb[j]='e')or
(Hb[i]='l')and(Hb[j]='f')then
begin if La[j]=1 then BMc[i]:='*';
if(BDc[j]='|')and(Hb[i]=Db[3])
then DCe[i]:='-'end;
{ACTIVE Branch}for i:=1to 9do Ba[i]:=0;
for i:=1to b do begin a:=BMc[i];
if Ie='_'then if a='*'then a:=' ';
if(BDc[i]='|')or(a='*')or(La[i]=1)
then Ba[i]:=1 end;
Mar:=' ';
if((Hb[Mi]='c')and(Hb[7]='d'))or
((Hb[Mi]='f')and(Hb[7]='g'))or
((Hb[Mi]='i')and(Hb[7]='j'))or
((Hb[Mi]='l')and(Hb[7]='a'))then
Mar:='A';
if((Hb[Mi]='d')and(Hb[7]='c'))or
((Hb[Mi]='g')and(Hb[7]='f'))or
((Hb[Mi]='j')and(Hb[7]='i'))or
((Hb[Mi]='a')and(Hb[7]='l'))then
Mar:='R';
{INC/DEC : Adv/Ret - BDc|/}
for i:=1to b do if((i=Mi)or(i=7))
and(Mar='A')then Bs[i]:=Bs[i]*1.25;
for i:=1to b do if((i=Mi)or(i=7))
and(Mar='R')then Bs[i]:=Bs[i]*0.75;
for i:=1to b do if(BDc[i]='|')and
(((h1=Mi)and(i=8))or((h2=Mi)and(i=9))
or(i=Mi)or(i=7))then begin
BDc[i]:='/';Bs[i]:=Bs[i]*3/4 end;
{Hid Branch IN/OUT ind : h1o/h2o}
if(h1>0)and(h1o=1)then h1o:=1
else h1o:=0;
if(h2>0)and(h2o=1)then h2o:=1
else h2o:=0;
if Ih='_'then begin
for i:=1to b do begin
if(h1o=1)or((BR[8,i]='>')and(Ba[i]=1))
then h1o:=2;
if(h2o=1)or((BR[9,i]='>')and(Ba[i]=1))
then h2o:=2 end end;
{Hol : Hid Branch NOT/OUT label}
if h1o>0then Hol[8]:=' 'else Hol[8]:='_';
if h2o>0then Hol[9]:=' 'else Hol[9]:='_';
{INT STEP : So S Sa - Hrm BRANCH INT}
So[1]:=0.60; So[2]:=0.60; So[3]:=0;
So[4]:=0; So[5]:=0; So[6]:=0;
if Ih='!'then begin
S[1]:=0.60; S[2]:=0.60; S[3]:=0;
S[4]:=0; S[5]:=0; S[6]:=0 end;
if Ih='_'then begin
S[1]:=0.60; S[2]:=0.60; S[3]:=0.40;
S[4]:=0.20; S[5]:=0.10; S[6]:=0.05 end;
Sa[1]:=1; Sa[2]:=0.95; Sa[3]:=0.80;
Sa[4]:=0.59; Sa[5]:=0.30; Sa[6]:=0.15;
{STEP value N/Na/No/Nh/Nha - Hrm BR INT}
for i:=1to b do Hp[i]:=0;
for i:=1to b do for j:=1to b do
begin N[i,j]:=0;Na[i,j]:=0;
Nh[i,j]:=0;Nha[i,j]:=0 end;
for i:=1to b do case(i)of
7:Hp[i]:=Mi;8:Hp[i]:=h1;9:Hp[i]:=h2;
else Hp[i]:=i end;
for i:=1to b do for j:=1to b do
if(i>j)or(i<j)then begin
x:=Hp[i];y:=Hp[j];
if(Hp[i]>Hp[j])then N[i,j]:=S[(x-y)+1]
else N[i,j]:=S[(y-x)+1];
if(Hp[i]>Hp[j])then Na[i,j]:=Sa[(x-y)+1]
else Na[i,j]:=Sa[(y-x)+1];
if(Hp[i]>Hp[j])then No[i,j]:=So[(x-y)+1]
else No[i,j]:=So[(y-x)+1];
if(Hp[i]>Hp[j])then Nh[i,j]:=S[(x-y)+1]/2
else Nh[i,j]:=S[(y-x)+1]/2;
if(Hp[i]>Hp[j])then
Nha[i,j]:=Sa[(x-y)+1]/2 else
Nha[i,j]:=Sa[(y-x)+1]/2 end;
{ Na : Mov Ln / Day Clash Ln}
for i:=1to b do for j:=1to b do
if(i>j)or(i<j)then begin
if Ba[i]=1then begin N[i,i]:=0.01;
N[i,j]:=Na[i,j];N[j,i]:=Na[j,i];
No[i,j]:=Na[i,j];No[j,i]:=Na[j,i]end;
{ Nha '_' Hid Act Ln - NOT/OUT}
if Ih='_'then begin
if(i=8)and(Ba[i]=1)and(h1o<1)then begin
N[i,j]:=Nha[i,j];N[j,i]:=Nha[j,i]end;
if(i=9)and(Ba[i]=1)and(h2o<1)then begin
N[i,j]:=Nha[i,j];N[j,i]:=Nha[j,i]end;
{ Nh '_' Hid Quiet Ln - NOT/OUT}
if(i=8)and(Ba[i]=0)and(h1o<1)then begin
N[i,j]:=Nh[i,j];N[j,i]:=Nh[j,i]end;
if(i=9)and(Ba[i]=0)and(h2o<1)then begin
N[i,j]:=Nh[i,j];N[j,i]:=Nh[j,i]end end;
{ N=0 '!' - Hidden Ln NOT/OUT}
if Ih='!'then begin
if(i=8)and(h1o<1)then begin
N[i,j]:=0;N[j,i]:=0 end;
if(i=9)and(h2o<1)then begin
N[i,j]:=0;N[j,i]:=0 end end end;
{Bso}for i:=1to b do Bso[i]:=Bs[i];
{EARTH Branch CLASH : Sc,Oc u,v}
Sc:=' ';Oc:=' ';u:=0;v:=0;
for j:=1to b do for i:=1to b do
if(i>j)or(i<j)then
if((Hb[i]='b')and(Hb[j]='h')or
(Hb[i]='e')and(Hb[j]='k')or
(Hb[i]='h')and(Hb[j]='b')or
(Hb[i]='k')and(Hb[j]='e'))and
((N[i,j]>0)or(N[j,i]>0))then begin
Sc:=Hb[i];Oc:=Hb[j];u:=i;v:=j;
if(i=Si)then Sc:='^';
if(i=Oi)then Sc:=':';
if(j=Si)then Oc:='^';
if(j=Oi)then Oc:=':'end;
u0:=u;v0:=v;
{Brch COMBINE - SAc/OAc : S/O Act Comb}
x:=0;y:=0;SAc:=' ';OAc:=' ';uv:='_';
for i:=1to b do for j:=1to b do
if(Hb[i]='a')and(Hb[j]='b')or
(Hb[i]='c')and(Hb[j]='l')or
(Hb[i]='d')and(Hb[j]='k')or
(Hb[i]='e')and(Hb[j]='j')or
(Hb[i]='f')and(Hb[j]='i')or
(Hb[i]='g')and(Hb[j]='h')then begin
if u>0then begin uv:='*';
if(((i=u)or(i=v))and(Ba[j]=1))
or(((j=u)or(j=v))and(Ba[i]=1))then
begin u:=0;v:=0;uv:='~'end end;
if i=Si then x:=j;if j=Si then x:=i;
if i=Oi then y:=j;if j=Oi then y:=i;
if(No[i,j]>0)or(No[j,i]>0)then begin
if(i=Si)or(j=Si)then SAc:='^';
if(i=Oi)or(j=Oi)then OAc:=':'end end;
{c1,c2,c3:S/O - Cb:x/y Date bind}
c1:=' ';if x=Oi then c1:=' ';
if Bb[Si]='~'then c1:='~';
if(x>0)and((x>Oi)or(x<Oi))and(SAc='^')
then c1:='!';
if((x>0)and((x>Oi)or(x<Oi))and(SAc='^'))
and (Bb[Si]='~')then c1:='#';
c3:=' ';if x=Oi then c3:=' ';
if Bb[Oi]='~'then c3:='~';
if(y>0)and((x>Oi)or(x<Oi))and(OAc=':')
then c3:='!';
if((y>0)and((x>Oi)or(x<Oi))and(OAc=':'))
and(Bb[Oi]='~')then c3:='#';
{s1-s4: S/O/x/y Act Int Ind}
s1:='_';s2:=' ';s3:='_';s4:='_';
for i:=1to b do for j:=1to b do
if(i>j)or(i<j)then begin
if No[x,Oi]>0 then s1:=':';
if No[Si,Oi]>0then s2:=':';
if No[Si,y]>0 then s3:=':';
if No[x,y]>0 then s4:=':'end;
if x>0then begin
if((BMc[x]='*')or(BMc[Oi]='*'))
and(s1='_')then s1:='*'end;
if((BMc[Si]='*')or(BMc[Oi]='*'))
and(s2=' ')then s2:='*';
if y>0then begin
if((BMc[Si]='*')or(BMc[y]='*'))
and(s3='_')then s3:='*'end;
if(x>0)and(y>0)then begin
if((BMc[x]='*')or(BMc[y]='*'))
and(s4='_')then s4:='*'end;
{u1/u2/u3/u4 : S/O/x/y Ml clash Ind}
u1:=' ';u2:=' ';u3:=' ';u4:=' ';
if BMc[x]='*' then u1:='*';
if BMc[Si]='*'then u2:='*';
if BMc[Oi]='*'then u3:='*';
if BMc[y]='*' then u4:='*';
{Bei}
for i:=0to 9do Bei[i]:=' ';
for i:=1to b do begin
if BMc[i]='*'then Bei[i]:='*';
if DCe[i]='-'then Bei[i]:='-';
if BDc[i]='|'then Bei[i]:='|';
if BDc[i]='/'then Bei[i]:='/'end;
{Gen/Con G/C}
for i:=1to b do begin G[i]:=0;C[i]:=0;
G0[i]:=1;C0[i]:=1 end;
for i:=1to b do for j:=1to b do
if(i>j)or(i<j)then begin
if Be[i]='W'then case(Be[j])of
'F':G[i]:=G[i]+N[i,j];
'E':C[i]:=C[i]+N[i,j]end;
if Be[i]='F'then case(Be[j])of
'E':G[i]:=G[i]+N[i,j];
'M':C[i]:=C[i]+N[i,j]end;
if Be[i]='E'then case(Be[j])of
'M':G[i]:=G[i]+N[i,j];
'w':C[i]:=C[i]+N[i,j]end;
if Be[i]='M'then case(Be[j])of
'w':G[i]:=G[i]+N[i,j];
'W':C[i]:=C[i]+N[i,j]end;
if Be[i]='w'then case(Be[j])of
'W':G[i]:=G[i]+N[i,j];
'F':C[i]:=C[i]+N[i,j]end end;
for i:=1to b do begin
Ng[i]:=0;Nc[i]:=0 end;
for i:=1to b do for j:=1to b do
if(i>j)or(i<j)then begin
if Be[i]='W'then case(Be[j])of
'F':Ng[i]:=Ng[i]+1;
'E':Nc[i]:=Nc[i]+1 end;
if Be[i]='F'then case(Be[j])of
'E':Ng[i]:=Ng[i]+1;
'M':Nc[i]:=Nc[i]+1 end;
if Be[i]='E'then case(Be[j])of
'M':Ng[i]:=Ng[i]+1;
'w':Nc[i]:=Nc[i]+1 end;
if Be[i]='M'then case(Be[j])of
'w':Ng[i]:=Ng[i]+1;
'W':Nc[i]:=Nc[i]+1 end;
if Be[i]='w'then case(Be[j])of
'W':Ng[i]:=Ng[i]+1;
'F':Nc[i]:=Nc[i]+1 end end;
for i:=1 to b do if Ng[i]>0 then
G[i]:=G[i]/Ng[i] else G[i]:=Ng[i];
for i:=1 to b do if Nc[i]>0 then
C[i]:=C[i]/Nc[i] else C[i]:=Nc[i];
if(Md='S')or(Md='M')then begin
if uv='~'then for i:=1to b do
if(i=u0)or(i=v0)then begin
G[i]:=G[i]/2;C[i]:=C[i]/2;
G0[i]:=0.5;C0[i]:=0.5 end;
if uv='*'then for i:=1to b do
if(i=u)or(i=v)then begin G[i]:=0;
C[i]:=0;G0[i]:=0;C0[i]:=0 end end;
if(Md='R')or(Md='L')then begin
if uv='*'then for i:=1to b do
if(i=u)or(i=v)then begin
G[i]:=G[i]/2;C[i]:=C[i]/2;
G0[i]:=0.5;C0[i]:=0.5 end end;
zF:=0; {Pi CYCLE}
zP:=0; G4: if kP>0then
for i:=1to b do Bs[i]:=RBd[i];
if Co='s'then if kP=0
then Oo:='o'else Oo:='n';
if Co='a'then Oo:='o';
if Co='C'then if(kP=0)or(kP=Pi-1)or(zP=1)
then Oo:='o'else Oo:='n';
if Co='O'then if(kP=0)or(kP=Pi-1)
then Oo:='o'else Oo:='n';
if Co='o'then if kP=Pi-1
then Oo:='o'else Oo:='n';
if Pi<3then Oo:='o';
if Co='n'then Oo:='n';
{ABs} G6: if zF=1then
for i:=1to b do Bs[i]:=ABs[i];
{Bg Bc Bd}
for i:=1to b do begin
Bg[i]:=0;Bc[i]:=0 end;
for i:=1to b do for j:=1to b do
if(i>j)or(i<j)then begin
if Be[i]='W'then case(Be[j])of
'w':Bg[i]:=Bg[i]+(Bs[j]*N[i,j]*G0[j]);
'M':Bc[i]:=Bc[i]+(Bs[j]*N[i,j]*C0[j])end;
if Be[i]='F'then case(Be[j])of
'W':Bg[i]:=Bg[i]+(Bs[j]*N[i,j]*G0[j]);
'w':Bc[i]:=Bc[i]+(Bs[j]*N[i,j]*C0[j])end;
if Be[i]='E'then case(Be[j])of
'F':Bg[i]:=Bg[i]+(Bs[j]*N[i,j]*G0[j]);
'W':Bc[i]:=Bc[i]+(Bs[j]*N[i,j]*C0[j])end;
if Be[i]='M'then case(Be[j])of
'E':Bg[i]:=Bg[i]+(Bs[j]*N[i,j]*G0[j]);
'F':Bc[i]:=Bc[i]+(Bs[j]*N[i,j]*C0[j])end;
if Be[i]='w'then case (Be[j])of
'M':Bg[i]:=Bg[i]+(Bs[j]*N[i,j]*G0[j]);
'E':Bc[i]:=Bc[i]+(Bs[j]*N[i,j]*C0[j])end
end;
{To STOP Int for ! Hid NOT/OUT}
for i:=1to b do e[i]:=1;
if Ih='!'then begin if h1o=0then e[8]:=0;
if h2o=0then e[9]:=0 end;
{Es Eg Ec}for i:=1to b do Es[i]:=0;
for i:=1to b do begin case(Be[i])of
'W':Es[Wd]:=Es[Wd]+(Bs[i]*e[i]);
'F':Es[Fr]:=Es[Fr]+(Bs[i]*e[i]);
'E':Es[Er]:=Es[Er]+(Bs[i]*e[i]);
'M':Es[Me]:=Es[Me]+(Bs[i]*e[i]);
'w':Es[wt]:=Es[wt]+(Bs[i]*e[i])end end;
for i:=1to b do begin
Eg[i]:=0;Ec[i]:=0 end;
for i:=1to b do begin case(Be[i])of
'W':Eg[Wd]:=Eg[Wd]+(Bs[i]*G[i]*e[i]);
'F':Eg[Fr]:=Eg[Fr]+(Bs[i]*G[i]*e[i]);
'E':Eg[Er]:=Eg[Er]+(Bs[i]*G[i]*e[i]);
'M':Eg[Me]:=Eg[Me]+(Bs[i]*G[i]*e[i]);
'w':Eg[wt]:=Eg[wt]+(Bs[i]*G[i]*e[i])end
end;
for i:=1to b do begin case(Be[i])of
'W':Ec[Wd]:=Ec[Wd]+(Bs[i]*C[i]*e[i]);
'F':Ec[Fr]:=Ec[Fr]+(Bs[i]*C[i]*e[i]);
'E':Ec[Er]:=Ec[Er]+(Bs[i]*C[i]*e[i]);
'M':Ec[Me]:=Ec[Me]+(Bs[i]*C[i]*e[i]);
'w':Ec[wt]:=Ec[wt]+(Bs[i]*C[i]*e[i])end
end;
for i:=1to b do En[i]:=0;
for i:=1to b do begin case(Be[i])of
'W':En[Wd]:=En[Wd]+(C[i]*e[i]);
'F':En[Fr]:=En[Fr]+(C[i]*e[i]);
'E':En[Er]:=En[Er]+(C[i]*e[i]);
'M':En[Me]:=En[Me]+(C[i]*e[i]);
'w':En[wt]:=En[wt]+(C[i]*e[i])end end;
{En0/Es0}if kP=0then begin
En0[1]:=0;Es0[0]:=0;
En0[1]:=En[Wd];En0[2]:=En[Fr];
En0[3]:=En[Er];En0[4]:=En[Me];
En0[5]:=En[wt];
Es0[1]:=Es[Wd];Es0[2]:=Es[Fr];
Es0[3]:=Es[Er];Es0[4]:=Es[Me];
Es0[5]:=Es[wt]end;
{He: Es0}for i:=1to 5do e[i]:=Es0[i];
e[0]:=e[1];m1:=1;for i:=2to 5do
if e[i]>e[0]then begin e[0]:=e[i];
m1:=i end;He:=Be[b+8+m1];
{Elm gen/con - Ig/Ic}
for i:=1to 20do begin
Ig[i]:=0;Ic[i]:=0 end;
Ig[1]:=Eg[5];Ig[3]:=Eg[2];Ig[5]:=Eg[4];
Ig[2]:=Eg[1];Ig[4]:=Eg[3];
Ic[1]:=Ec[4];Ic[3]:=Ec[1];Ic[5]:=Ec[3];
Ic[2]:=Ec[5];Ic[4]:=Ec[2];
{IgC/IcC % Es is gen/conq}
for i:=1to 5do IgC[i]:=0;
if Es[5]>0then IgC[1]:=Ig[1]/Es[5];
if Es[1]>0then IgC[2]:=Ig[2]/Es[1];
if Es[2]>0then IgC[3]:=Ig[3]/Es[2];
if Es[3]>0then IgC[4]:=Ig[4]/Es[3];
if Es[4]>0then IgC[5]:=Ig[5]/Es[4];
for i:=1to 5do IcC[i]:=0;
if Es[4]>0then IcC[1]:=Ic[1]/Es[4];
if Es[5]>0then IcC[2]:=Ic[2]/Es[5];
if Es[1]>0then IcC[3]:=Ic[3]/Es[1];
if Es[2]>0then IcC[4]:=Ic[4]/Es[2];
if Es[3]>0then IcC[5]:=Ic[5]/Es[3];
{RESULTANT VALUES CALCULATION}
for i:=1to 5do Es[i+5]:=Es[i];
for i:=1to 5do Ig[i+5]:=Ig[i];
for i:=1to 5do Ic[i+5]:=Ic[i];
Es[0]:=Es[1];m1:=1;for i:=2to 5do
if Es[i]>Es[0]then begin
Es[0]:=Es[i];m1:=i end;
{Es pos no}
if m1=1then begin
xS:=1;xP:=2;yW:=3;yP:=4;xG:=5 end;
if m1=2then begin
xS:=2;xP:=3;yW:=4;yP:=5;xG:=1 end;
if m1=3then begin
xS:=3;xP:=4;yW:=5;yP:=1;xG:=2 end;
if m1=4then begin
xS:=4;xP:=5;yW:=1;yP:=2;xG:=3 end;
if m1=5then begin
xS:=5;xP:=1;yW:=2;yP:=3;xG:=4 end;
Es[yW+5]:=Es[yW]-Ic[yW];if Es[yW+5]<0
then begin Ig[yP]:=0;Ic[xG]:=0 end;
if Es[yW+5]>0then begin
Ig[yP]:=Es[yW+5]*IgC[yP];
Ic[xG]:=Es[yW+5]*IcC[xG]end;
Es[xG+5]:=Es[xG]-Ic[xG];if Es[xG+5]<0
then begin Ig[xS]:=0;Ic[xP]:=0 end;
if Es[xG+5]>0then begin
Ig[xS]:=Es[xG+5]*IgC[xS];
Ic[xP]:=Es[xG+5]*IcC[xP]end;
Es[xP+5]:=Es[xP]-Ic[xP];if Es[xP+5]<0
then begin Ig[yW]:=0;Ic[yP]:=0 end;
if Es[xP+5]>0then begin
Ig[yW]:=Es[xP+5]*IgC[yW];
Ic[yP]:=Es[xP+5]*IcC[yP]end;
Es[yP+5]:=Es[yP]-Ic[yP];if Es[yP+5]<0
then begin Ig[xG]:=0;Ic[xS]:=0 end;
if Es[yP+5]>0then begin
Ig[xG]:=Es[yP+5]*IgC[xG];
Ic[xS]:=Es[yP+5]*IcC[xS]end;
Es[xS+5]:=Es[xS]-Ic[xS];if Es[xS+5]<0
then begin Ig[xP]:=0;Ic[yW]:=0 end;
if Es[xS+5]>0then begin
Ig[xP]:=Es[xS+5]*IgC[xP];
Ic[yW]:=Es[xS+5]*IcC[yW]end;
{FINAL RESULTANT CAL}
for i:=1to 5do Fs[i]:=0;
for i:=1to 5do Fs[i]:=Ig[i];
for i:=1to 5do Es[i+5]:=Es[i+5]+Fs[i];
for i:=1to 5do
if(Es[i+5]<0)or(Ig[i]=0)then Fs[i]:=0;
for i:=1to 5do
if Es[i+5]>0then if Es[i+5]<Fs[i]
then Fs[i]:=Es[i+5];
Es[7]:= Es[7]+(Fs[1]*IgC[2]);
Es[8]:= Es[8]-(Fs[1]*IcC[3]);
Es[8]:= Es[8]+(Fs[2]*IgC[3]);
Es[9]:= Es[9]-(Fs[2]*IcC[4]);
Es[9]:= Es[9]+(Fs[3]*IgC[2]);
Es[10]:=Es[10]-(Fs[3]*IcC[3]);
Es[10]:=Es[10]+(Fs[4]*IgC[2]);
Es[6]:= Es[6]-(Fs[4]*IcC[3]);
Es[6]:= Es[6]+(Fs[5]*IgC[2]);
Es[7]:= Es[7]-(Fs[5]*IcC[3]);
if Es[6]<0then begin
Ig[2]:=0;Ic[3]:=0 end;
if Es[7]<0then begin
Ig[3]:=0;Ic[4]:=0 end;
if Es[8]<0then begin
Ig[4]:=0;Ic[5]:=0 end;
if Es[9]<0then begin
Ig[5]:=0;Ic[1]:=0 end;
if Es[10]<0then begin
Ig[1]:=0;Ic[2]:=0 end;
for i:=1to 5do
if(Es[i+5]<0)or(Ig[i]=0)then Fs[i]:=0;
for i:=1to 5do
if Es[i+5]>0then if Es[i+5]<Fs[i]
then Fs[i]:=Es[i+5];
if Es[6]>0then begin
Ig[2]:=Ig[2]+(Fs[1]*IgC[2]);
Ic[3]:=Ic[3]+(Fs[1]*IcC[3])end;
if Es[7]>0then begin
Ig[3]:=Ig[3]+(Fs[2]*IgC[3]);
Ic[4]:=Ic[4]+(Fs[2]*IcC[4])end;
if Es[8]>0then begin
Ig[4]:=Ig[4]+(Fs[3]*IgC[4]);
Ic[5]:=Ic[5]+(Fs[3]*IcC[5])end;
if Es[9]>0then begin
Ig[5]:=Ig[5]+(Fs[4]*IgC[5]);
Ic[1]:=Ic[1]+(Fs[4]*IcC[1])end;
if Es[10]>0then begin
Ig[1]:=Ig[1]+(Fs[5]*IgC[1]);
Ic[2]:=Ic[2]+(Fs[5]*IcC[2])end;
for i:=1to 5do
Es[i+5]:=(Es[i]+(Ig[i]))-Ic[i];
{RBc RBg RBd}
for i:=1to 9do begin RBd[i]:=0;
RBc[i]:=Bc[i];RBg[i]:=Bg[i]end;
for i:=1to b do begin
if Ic[Bp[i]+5]=0then RBc[i]:=0 else
RBc[i]:=(RBc[i]*Ic[Bp[i]])/Ic[Bp[i]+5];
if Ig[Bp[i]+5]=0then RBg[i]:=0 else
RBg[i]:=(RBg[i]*Ig[Bp[i]])/Ig[Bp[i]+5]
end;for i:=1to b do
RBd[i]:=(Bs[i]+(RBg[i]))-RBc[i];
if on='n'then begin
for i:=1to b do e[i]:=RBd[i];
e[0]:=e[1];m1:=1;for i:=2to b do if
e[i]>e[0]then begin e[0]:=e[i];m1:=i end;
e[0]:=e[1];m2:=1;for i:=2to b do if
e[i]<e[0]then begin e[0]:=e[i];m2:=i end;
3:repeat for i:=1to b do e[i]:=e[i]/2;
until (e[m1]<=0.1)and(e[m2]>=-0.1);
for i:=1to b do RBd[i]:=e[i]*4 end;
if(on='z')then begin
RBd[0]:=RBd[1];m1:=1;for i:=2to b do
if RBd[i]<RBd[0]then begin
RBd[0]:=RBd[i];m1:=i end;
RBd[0]:=RBd[m1];if RBd[0]<0then begin
RBd[0]:=RBd[0]-(RBd[0]*2);
for i:=1to b do RBd[i]:=RBd[i]+RBd[0]end;
RBd[0]:=0;
for i:=1to b do RBd[0]:=RBd[0]+RBd[i];
for i:=1to b do
RBd[i]:=(((RBd[i]*100)/RBd[0]))/100 end;
{RBP}for i:=1to b do PN[i]:=' ';
for i:=1to b do begin if Bs[i]>0then
RBP[i]:=((RBd[i]*10)/(Bs[i]))-10;
if(RBd[i]-Bs[i])<0then begin PN[i]:='-';
RBP[i]:=((RBd[i]*10)/(Bs[i]))-10;
if RBP[i]<0then
RBP[i]:=RBP[i]-(RBP[i]*2)end;
if RBP[i]>99then RBP[i]:=99;
if Bs[i]=RBd[i]then RBP[i]:=0 end;
case(Hb[Si])of
'a':Sf:='A';'b':Sf:='B';'c':Sf:='C';
'd':Sf:='D';'e':Sf:='E';'f':Sf:='F';
'g':Sf:='G';'h':Sf:='H';'i':Sf:='I';
'j':Sf:='J';'k':Sf:='K';'l':Sf:='L'end;
{Ts}for i:=1to 5do Ts[i]:=0;
for i:=1to b do RBo[i]:=RBd[i];
for i:=1to b do
if RBo[i]<0then RBo[i]:=0;
for i:=1to b do case(Be[i])of
'W':Ts[1]:=Ts[1]+RBo[i];
'F':Ts[2]:=Ts[2]+RBo[i];
'E':Ts[3]:=Ts[3]+RBo[i];
'M':Ts[4]:=Ts[4]+RBo[i];
'w':Ts[5]:=Ts[5]+RBo[i]end;
{TsA}for i:=1to 5do AEl[i]:=' ';
for i:=1to b do begin
a:=Bei[i];if(i=Mi)or(i=7)then a:='-';
if(Be[i]='W')and(Ba[i]=1)then AEl[1]:=a;
if(Be[i]='F')and(Ba[i]=1)then AEl[2]:=a;
if(Be[i]='E')and(Ba[i]=1)then AEl[3]:=a;
if(Be[i]='M')and(Ba[i]=1)then AEl[4]:=a;
if(Be[i]='w')and(Ba[i]=1)then AEl[5]:=a
end;
{Te: Ts}for i:=1to 5do e[i]:=Ts[i];
e[0]:=e[1];m1:=1;for i:=2to 5do
if e[i]>e[0]then begin
e[0]:=e[i];m1:=i end;Te:=Be[b+8+m1];
{RBs RBm}if zP=0 then
for i:=1to 9do RBs[i]:=0;
for i:=1to 9do RBs[i]:=RBs[i]+RBd[i];
if zP>0 then
for i:=1to 9do RBm[i]:=RBs[i]/(zP+1);
{TsS TsM}if zP=0then
for i:=1to 5do TsS[i]:=0;
for i:=1to b do if RBm[i]<0then
RBo[i]:=0 else RBo[i]:=RBm[i];
for i:=1to b do case(Be[i])of
'W':TsS[1]:=TsS[1]+RBo[i];
'F':TsS[2]:=TsS[2]+RBo[i];
'E':TsS[3]:=TsS[3]+RBo[i];
'M':TsS[4]:=TsS[4]+RBo[i];
'w':TsS[5]:=TsS[5]+RBo[i]end;
if zP>0 then
for i:=1to 5do TsM[i]:=TsS[i]/(zP+1);
{Se: TsM}for i:=1to 5do e[i]:=TsM[i];
e[0]:=e[1];m1:=1;for i:=2to 5do
if e[i]>e[0]then begin e[0]:=e[i];
m1:=i end;Se:=Be[b+8+m1];
{RBa}if(zP=Pi-1)then begin case(ET)of
'E':for i:=1to b do e[i]:=Bso[i];
'T':for i:=1to b do e[i]:=RBd[i];
'M':for i:=1to b do e[i]:=RBm[i]end;
for i:=1to b do eW[i]:=e[i];
for i:=1to b do for j:=1to b do
if(i>j)or(i<j)then
if(BR[i,j]='>')and(Ba[i]=1)then
if e[i]<0then e[i]:=e[j]*N[i,j]*G0[j]
else e[i]:=e[i]+e[j]*N[i,j]*G0[j];
for i:=1to b do for j:=1to b do
if(i>j)or(i<j)then
if(BR[i,j]='>')and(Ba[j]=1)then
if e[i]<0then e[i]:=e[j]*N[i,j]*G0[j]
else e[i]:=e[i]+e[j]*N[i,j]*G0[j];
for i:=1to b do RBa[i]:=e[i];
{RBr}for i:=1to b do
RBr[i]:=RBa[i]-eW[i];if Cl=':'then
for i:=1to b do RBa[i]:=RBr[i];
{TsA}for i:=1to 5do TsA[i]:=0;
for i:=1to b do if RBa[i]<0then
RBo[i]:=0 else RBo[i]:=RBa[i];
for i:=1to b do case(Be[i])of
'W':TsA[1]:=TsA[1]+RBo[i];
'F':TsA[2]:=TsA[2]+RBo[i];
'E':TsA[3]:=TsA[3]+RBo[i];
'M':TsA[4]:=TsA[4]+RBo[i];
'w':TsA[5]:=TsA[5]+RBo[i]end;
{Ae: TsA}for i:=1to 5do e[i]:=TsA[i];
e[0]:=e[1];m1:=1;for i:=2to 5do
if e[i]>e[0]then begin e[0]:=e[i];
m1:=i end;Ae:=Be[b+8+m1]end;
{ABs}if zF=0then begin
for i:=1to b do ABs[i]:=ABs[i]+RBd[i];
if zP>2then if zP=Pi-1 then begin
for i:=1to b do ABs[i]:=ABs[i]/Pi;
zF:=1; goto G6 end end;
if(zF=1)or(zP=Pi-1)then begin
{EcR/WgP PREDICTION CALCULATION}
if ET='E'then for i:=1to 5do begin
e[i]:=Es0[i];eW[i]:=Es0[i];a:=He end;
if ET='T'then for i:=1to 5do begin
e[i]:=Ts[i];eW[i]:=Ts[i];a:=Te end;
if ET='M'then for i:=1to 5do begin
e[i]:=TsM[i];eW[i]:=TsM[i];a:=Se end;
if oa=':'then for i:=1to 5do begin
e[i]:=TsA[i];eW[i]:=TsA[i];a:=Ae end;
{ET - Es0/Ts/TsM pos no}
if a='W'then begin
xS:=1;xP:=2;yW:=3;yP:=4;xG:=5 end;
if a='F'then begin
xS:=2;xP:=3;yW:=4;yP:=5;xG:=1 end;
if a='E'then begin
xS:=3;xP:=4;yW:=5;yP:=1;xG:=2 end;
if a='M'then begin
xS:=4;xP:=5;yW:=1;yP:=2;xG:=3 end;
if a='w'then begin
xS:=5;xP:=1;yW:=2;yP:=3;xG:=4 end;
{EcT/EcR : ET conq/Res ET}
EcT[1]:=e[4]*En0[4];
EcT[2]:=e[5]*En0[5];
EcT[3]:=e[1]*En0[1];
EcT[4]:=e[2]*En0[2];
EcT[5]:=e[3]*En0[3];
for i:=1to 5do
if EcT[i]<=0then EcT[i]:=0;
for i:=1to 5 do EcR[i]:=e[i]-EcT[i];
for i:=1to 5 do ETx[i]:=e[i];
{FINAL CALCULATION - Int Adj}
if EcR[yW]<=0then EcT[xG]:=0;
if e[xG]<eW[xG]then ETx[xG]:=eW[xG];
if(ETx[yW]-EcT[yW])>0then
EcT[xP]:=(ETx[xG]-EcT[xG])*En0[xG];
if EcR[xP]<=0then EcT[yP]:=0;
if e[yP]<eW[yP]then ETx[yP]:=eW[yP];
if(ETx[xP]-EcT[xP])>0then
EcT[yP]:=(ETx[xP]-EcT[xP])*En0[xP];
if(ETx[yP]-EcT[yP])>0then
EcT[xS]:=(ETx[yP]-EcT[yP])*En0[yP];
for i:=1to 5do
if EcT[i]<=0then EcT[i]:=0;
for i:=1to 5do EcR[i]:=ETx[i]-EcT[i];
{Re: EcR}for i:=1to 5do e[i]:=EcR[i];
e[0]:=e[1];m1:=1;for i:=2to 5do
if e[i]>e[0]then begin e[0]:=e[i];
m1:=i end;Re:=Be[b+8+m1]{zF=1}end;
for i:=1to 5do EcR[i+5]:=EcR[i];
for i:=1to 10do e[i]:=EcR[i];
{Wg/WgP}if Gn='r'then
for i:=1to 5do Wg[i]:=EcR[i]else begin
if oa=':'then
for i:=1to 5do Wg[i]:=TsA[i]else
case(ET)of
'E':for i:=1to 5do Wg[i]:=Es0[i];
'T':for i:=1to 5do Wg[i]:=Ts[i];
'M':for i:=1to 5do Wg[i]:=TsM[i]end end;
for i:=1to 5do Wg[i+5]:=Wg[i];
for i:=1to 10do e[i]:=Wg[i];
if Aa='_'then for i:=1to 10do
if Wg[i]<=0then e[i]:=0;
eW[1]:=e[5]-e[4];eW[4]:=e[3]-e[2];
eW[2]:=e[1]-e[5];eW[5]:=e[4]-e[3];
eW[3]:=e[2]-e[1];
e[1]:=(eW[2]-eW[4])+(eW[3]-eW[5]);
e[2]:=(eW[3]-eW[5])+(eW[4]-eW[1]);
e[3]:=(eW[4]-eW[1])+(eW[5]-eW[2]);
e[4]:=(eW[5]-eW[2])+(eW[1]-eW[3]);
e[5]:=(eW[1]-eW[3])+(eW[2]-eW[4]);
for i:=1to 5do TmR[i]:=e[i];
for i:=1to 5do e[i+5]:=e[i];
WgP:={e[Ep[Si]+4]+}e[Ep[Si]+1]
-e[Ep[Si]+3];
Pw:='_';
if WgP>0then Pw:='<';
if WgP<0then Pw:='>';
{Results HEADING}
if(Cs='r')and(z=0)and(kT=0)then begin
Write(Wn[1],' (',An,')');
if Dr>1then Write('-',Dr);
Writeln(' zMar 8');Writeln end;
{kT/kR/pT/B1-2}k:=Ns+z;kT:=k;kR:=Rn[z+1];
B1:='(';B2:=')';if Wn[1]=Qo[z+1]then
begin B1:=' ';B2:=' 'end;
if pT>Sk then pT:=Sk;
{TsA/Pm}if(Pm[3]='-')and(Rr='o')
and(zu<3)and(PmL='o')then begin
if zP=1 then begin Write(' ');
for i:=1to 5do begin
if i=Ep[Si]then Write('.',AEl[i],'.')else
Write(' ',AEl[i],' ')end;Writeln end;
k:=-1;
case(Pm[1])of'8':k:=3141;'9':k:=16180;
'1':k:=11;'2':k:=31;'3':k:=61;'4':k:=161;
'5':k:=314;'6':k:=618;'7':k:=1618 end;
for i:=1to 9do Pc[i]:=-1;
if Pm[5]>='1'then Pc[1]:=11;
if Pm[5]>='2'then Pc[2]:=31;
if Pm[5]>='3'then Pc[3]:=61;
if Pm[5]>='4'then Pc[4]:=161;
if Pm[5]>='5'then Pc[5]:=314;
if Pm[5]>='6'then Pc[6]:=618;
if Pm[5]>='7'then Pc[7]:=1618;
if Pm[5]>='8'then Pc[8]:=3141;
if Pm[5]>='9'then Pc[9]:=16180;
if(zP=Pc[1])or(zP=Pc[4])or(zP=Pc[7])
or(zP=Pc[2])or(zP=Pc[5])or(zP=Pc[8])
or(zP=Pc[3])or(zP=Pc[6])or(zP=Pc[9])
or((zP>0)and(zP<k))or(zP=Pi-1)then begin
if ET='E'then begin a:='o';
for i:=1to 5do e[i]:=Es0[i]*mc end;
if ET='T'then begin a:='s';
for i:=1to 5do e[i]:=Ts[i]*mc end;
if ET='M'then begin a:='m';
for i:=1to 5do e[i]:=TsM[i]*mc end;
case(a)of'o':Write(He,'-');
's':Write(Te,':');'m':Write(Se,'.')end;
Write(' ');for i:=1to 5do begin
if(e[i]>0)and(e[i]<0.95)then
Write('<',(e[i]*10):0:0,' ')else begin
if e[i]>=0then Write(' ');
if(e[i]<9.5)and(e[i]>=0)
then Write(e[i]:0:0,' ');
if(e[i]>9.5)and(e[i]>=0)
then Write(e[i]:0:0);
if(e[i]>-9.5)and(e[i]<0)
then Write(e[i]:0:0,' ');
if(e[i]<-9.5)then Write(e[i]:0:0);
end end;Writeln(' ',zP,' ')end;
if(zP=0)and(z>0)then Writeln end;
{Rw/Xw}if zP=0then begin Rw:=0;
for i:=1to 99do if Wh[i]=Rn[kT]
then begin Rw:=i;Xw[kT]:=Rw end end;
if(zu>1)and(zP=0)and(zr=1)and(kT>1)then
Writeln;
if (op='o')and(Qo[z+1]=0)then Oo:='n';if
(Rr='R')or(Rr='r')or(Oo='n')then goto G5;
{OUTPUT 0}Pw:='_';
if WgP>0then Pw:='<';
if WgP<0then Pw:='>';
if Md<='S'then begin Write(Yr-2000);
if Mt>9then Write(Mt)else Write('0',Mt);
if Dy>9then Write(Dy)else Write('0',Dy);
Write(I4[zr],I5[zr],I6[zr],'___',Pw);
if Rw=0then Write('__')else if Rw>9then
Write(Rw)else Write(Rw,'_');
Write('____',Rn[kT],FSi[kT],'_');
if Is='.'then begin
for i:=1to b do e[i]:=RBr[i]*mc;
for i:=1to 5do begin if i=h1 then begin
if(e[8]>0)and(e[8]<0.95)then
Write('<',(e[8]*10):0:0,'_')else begin
if e[8]<0then begin
if e[8]<=-9.5then Write(e[8]:0:0);
if e[8]>-9.5then Write(e[8]:0:0,'_')end;
if e[8]>=0then begin
if e[8]<9.5then Write(' ',e[8]:0:0,'_');
if e[8]>=9.5then
Write(' ',e[8]:0:0)end end end;
if i=h2 then begin
if(e[9]>0)and(e[9]<0.95)then
Write('<',(e[9]*10):0:0,'_')else begin
if e[9]<0 then begin
if e[9]<=-9.5then Write(e[9]:0:0);
if e[9]>-9.5then Write(e[9]:0:0,'_')end;
if e[9]>=0then begin
if e[9]<9.5then Write(' ',e[9]:0:0,'_');
if e[9]>=9.5then
Write(' ',e[9]:0:0)end end end;
if Hel[i]=' 'then Write('___')end end;
if Is='^'then for i:=1to 17do Write('_');
Writeln('_',I8[zr],Po,Pe);
{1}for i:=5to 8do if Db[i]='o'
then Write(' ')else Write(Db[i],' ');
Write(' ',B1,' ',(10*H)+L,' ',B2,' ');
if u0>0then begin
r:=(RBd[u0]-RBd[v0])*100;
if r>=99.5then r:=99;
if r<=-99.5then r:=-99;Write(Sc);
if r<0then begin
if r<=-9.5then Write(r:0:0);
if r>-9.5then Write(r:0:0,' ')end;
if r>=0then begin
if r<9.5then Write(' ',r:0:0,' ');
if r>=9.5then Write(' ',r:0:0)end;
Write(Oc)end;
if u0=0then Write('___',uv,'_');
if oa=':'then
for i:=1to b do e[i]:=RBa[i]*mc else
case(ET)of
'E':for i:=1to b do e[i]:=Bso[i]*mc;
'T':for i:=1to b do e[i]:=RBd[i]*mc;
'M':for i:=1to b do e[i]:=RBm[i]*mc end;
for i:=1to b do if(e[i]>-0.000000000001)
and(e[i]<=0.000000000001)then e[i]:=0;
for i:=1to 5do begin if i=h1 then begin
if(e[8]>0)and(e[8]<0.95)then
Write('<',(e[8]*10):0:0,'_')else begin
if e[8]<0then begin
if e[8]<=-9.5then Write(e[8]:0:0);
if e[8]>-9.5then Write(e[8]:0:0,'_')end;
if e[8]>=0then begin
if e[8]<9.5then Write(' ',e[8]:0:0,'_');
if e[8]>=9.5then
Write(' ',e[8]:0:0)end end end;
if i=h2 then begin
if(e[9]>0)and(e[9]<0.95)then
Write('<',(e[9]*10):0:0,'_')else begin
if e[9]<0 then begin
if e[9]<=-9.5then Write(e[9]:0:0);
if e[9]>-9.5then Write(e[9]:0:0,'_')end;
if e[9]>=0then begin
if e[9]<9.5then Write(' ',e[9]:0:0,'_');
if e[9]>=9.5then
Write(' ',e[9]:0:0)end end end;
if Hel[i]=' ' then Write('___')end;
{2}Writeln('__',Vd);
for i:=1to 4do if Db[i]='o'then
Write(' ')else Write(Db[i],' ');
Write(' ');
if x=Oi then Write('___|___ ')else begin
if(x=0)and(y=0)then Write('_______ ')
else Write(s1,'__',s4,'__',s3,' ')end;
if uv='~'then Write(' ',uv,' ')
else Write(' ');
for i:=1to 5do begin
if i=h1 then Write(Hol[8],Hb[8],Bei[8]);
if i=h2 then Write(Hol[9],Hb[9],Bei[9]);
if Hel[i]=' 'then Write(' ')end;
{3}Writeln;if Cl=':'then Write(':')
else Write(' ');Write(I7[zr],' ');
if(x=Oi)or(x=0)then Write(' ')else
if x>0then Write(u1,Hb[x],' ');
Write(c1,Sf,u2,' ',BR[Si,Oi],' ',
u3,Hb[Oi],c3,' ');
if(x=Oi)or(y=0)then Write(' ')else
if y>0then Write(Hb[y],u4,' ');
for i:=1to 6do begin
if i=Si then Write('(',Sf,Bei[i])else
if i=Oi then Write('•',Hb[i],Bei[i])
else Write(' ',Hb[i],Bei[i])end;Writeln;
{4}if Cs='r'then k:=kR else k:=kT;
if k<=9then Write('(',k,') ');
if(k>9)and(k<=99)then Write(k,') ');
if k>99then Write(k,')');
if(x=Oi)or(x=0)then Write(' ')else
if x>0then begin Write(' ');
if e[x]<0then begin
if e[x]<=-9.5then Write(e[x]:0:0);
if e[x]>-9.5then Write(e[x]:0:0,' ')end;
if e[x]>=0then begin
if e[x]<9.5then Write(' ',e[x]:0:0,' ');
if e[x]>=9.5then Write(' ',e[x]:0:0)end
end;
if e[Si]<0then begin
if e[Si]<=-9.5then Write(e[Si]:0:0);
if e[Si]>-9.5then Write(e[Si]:0:0,' ')
end;
if e[Si]>=0then begin if e[Si]<9.5then
Write(' ',e[Si]:0:0,' ');
if e[Si]>=9.5then Write(' ',e[Si]:0:0)
end;Write(' ',s2,' ');
if e[Oi]<0then begin if e[Oi]<=-9.5
then Write(e[Oi]:0:0);if e[Oi]>-9.5
then Write(e[Oi]:0:0,' ')end;
if e[Oi]>=0then begin if e[Oi]<9.5then
Write(' ',e[Oi]:0:0,' ');if e[Oi]>=9.5
then Write(' ',e[Oi]:0:0)end;
if x=Oi then Write(' ')else
if y>0then begin if e[y]<0then begin
if e[y]<=-9.5then Write(e[y]:0:0);
if e[y]>-9.5then Write(e[y]:0:0,' ')end;
if e[y]>=0then begin
if e[y]<9.5then Write(' ',e[y]:0:0,' ');
if e[y]>=9.5then
Write(' ',e[y]:0:0)end end;
if y=0then Write(' ');Write(' ');
for i:=1to 5do if i=Mi then
Write(Hb[7],Bei[7],' ')else Write(' ');
if 6=Mi then Write(Hb[7],Bei[7])
else Write(' ');
{5}Writeln;
if Ih='_'then Write(' ')else Write(Ih);
Write(' ');
if Ie='*'then Write(' ')else Write(Ie);
if(x=Oi)or(x=0)then Write(' ')
else if x>0then begin Write(' ');
if(RBP[x]>=0)and(RBP[x]<9.5)
then Write(PN[x],RBP[x]:0:0,' ');
if(RBP[x]>=9.5)and(RBP[x]<=99.5)
then Write(PN[x],RBP[x]:0:0)end;
if(RBP[Si]>=0)and(RBP[Si]<9.5)
then Write(PN[Si],RBP[Si]:0:0,' ');
if(RBP[Si]>=9.5)and(RBP[Si]<=99.5)
then Write(PN[Si],RBP[Si]:0:0);
r:=(e[Si]-e[Oi])*10;
if r>=99.5then r:=99;
if r<=-99.5then r:=-99;
if r<0then begin
if r<=-9.5then Write(r:0:0);
if r>-9.5then Write(r:0:0,' ')end;
if r>=0then begin
if r<9.5then Write(' ',r:0:0,' ');
if r>=9.5 then Write(' ',r:0:0)end;
if(RBP[Oi]>=0)and(RBP[Oi]<9.5)
then Write(PN[Oi],RBP[Oi]:0:0,' ');
if(RBP[Oi]>=9.5)and(RBP[Oi]<=99.5)
then Write(PN[Oi],RBP[Oi]:0:0);
if x=Oi then Write(' ')else
if y>0 then begin
if(RBP[y]>=0)and(RBP[y]<9.5)
then Write(PN[y],RBP[y]:0:0,' ');
if(RBP[y]>=9.5)and(RBP[y]<=99.5)
then Write(PN[y],RBP[y]:0:0)end;
if y=0then Write(' ');Write(' ');
for i:=1to 6do begin
if(e[i]>0)and(e[i]<0.95)then
Write('<',(e[i]*10):0:0,' ')else begin
if e[i]<0then begin
if e[i]<=-9.5then Write(e[i]:0:0);
if e[i]>-9.5then Write(e[i]:0:0,' ')end;
if e[i]>=0then begin if e[i]<9.5
then Write(' ',e[i]:0:0,' ');if e[i]>=9.5
then Write(' ',e[i]:0:0)end end end;
{6}Writeln;if oa=':'then Write(Ae)
else case(ET)of'E':Write(He);
'T':Write(Te);'M':Write(Se)end;
r:=WgP*mr;if(r>0)and(r<0.95)then
Write('<',(r*10):0:0,' ')else begin
if r>=0then Write('_');if(r<9.5)and(r>=0)
then Write(r:0:0,' ');
if(r>9.5)and(r>=0)then Write(r:0:0);
if(r>-9.5)and(r<0)then Write(r:0:0,' ');
if(r<-9.5)then Write(r:0:0)end;
Write(' ');if oa=':'then
for i:=1to 5do eE[i]:=TsA[i]*mc else
case(ET)of
'E':for i:=1to 5do eE[i]:=Es0[i]*mc;
'T':for i:=1to 5do eE[i]:=Ts[i]*mc;
'M':for i:=1to 5do eE[i]:=TsM[i]*mc end;
for i:=1to 5do begin
if(eE[i]>0)and(eE[i]<0.95)then
Write('<',(eE[i]*10):0:0,' ')else begin
if eE[i]>=0then Write(' ');
if(eE[i]<9.5)and(eE[i]>=0)
then Write(eE[i]:0:0,' ');
if(eE[i]>9.5)and(eE[i]>=0)
then Write(eE[i]:0:0);
if(eE[i]>-9.5)and(eE[i]<0)
then Write(eE[i]:0:0,' ');
if(eE[i]<-9.5)then
Write(eE[i]:0:0)end end;
if(eE[i]>9.5)or(eE[i]>-9.5)then
Write('__')else Write(' _');
for i:=1to 6do begin
if i=Mi then begin
if(e[7]>0)and(e[7]<0.95)then
Write('<',(e[7]*10):0:0,' ')else begin
if e[7]<0then begin
if e[7]<=-9.5then Write(e[7]:0:0);
if e[7]>-9.5then Write(e[7]:0:0,'_')end;
if e[7]>=0then begin if e[7]<9.5
then Write(' ',e[7]:0:0,'_');if e[7]>=9.5
then Write(' ',e[7]:0:0)end end end;
if (i>Mi)or(i<Mi)then Write('___')end;
Writeln('_') {Md<='S'}end;
{7}if Md<='M'then begin {M Mode}
Write(' ');
for i:=1to b do e[i]:=Bs[i]*100;
if b>=8then if e[8]<9.5 then
Write(e[8]:0:0,' ')else Write(e[8]:0:0);
if b<8then Write(' ');Write(' ');
if e[7]<9.5then Write(e[7]:0:0,' ')
else Write(e[7]:0:0);Write(' ');
if b=9then if e[9]<9.5then
Write(e[9]:0:0,' ')else Write(e[9]:0:0);
if b<9then Write(' ');Write(' ');
for i:=1to 6do if e[i]<9.5
then Write(e[i]:0:0,' ')
else Write(e[i]:0:0,' ');Writeln;
{8}Write(' ');
for i:=1to b do e[i]:=RBg[i]*100;
if b<8then Write(' ')else
if e[8]<9.5then Write(e[8]:0:0,' ')
else Write(e[8]:0:0);Write(' ');
if e[7]<9.5then Write(e[7]:0:0,' ')
else Write(e[7]:0:0);Write(' ');
if b<9then Write(' ')else
if e[9]<9.5then Write(e[9]:0:0,' ')
else Write(e[9]:0:0);Write(' ');
for i:=1to 6do
if e[i]<9.5then Write(e[i]:0:0,' ')
else Write(e[i]:0:0,' ');Writeln;
{9}Write(' ');
for i:=1to b do e[i]:=RBc[i]*100;
if b<8then Write(' ')else
if e[8]<9.5then Write(e[8]:0:0,' ')
else Write(e[8]:0:0);Write(' ');
if e[7]<9.5then Write(e[7]:0:0,' ')
else Write(e[7]:0:0);Write(' ');
if b<9then Write(' ')else
if e[9]<9.5then Write(e[9]:0:0,' ')
else Write(e[9]:0:0);Write(' ');
for i:=1to 6do
if e[i]<9.5then Write(e[i]:0:0,' ')
else Write(e[i]:0:0,' ');
{10}Writeln;Write('_____');
for i:=1to b do
if PN[i]=' 'then PN[i]:='_';
if b>=8then begin if RBP[8]<9.5
then Write(PN[8],RBP[8]:0:0,'_')
else Write(PN[8],RBP[8]:0:0)end;
if b<8then Write('___');Write('___');
if RBP[7]<9.5
then Write(PN[7],RBP[7]:0:0,'____')
else Write(PN[7],RBP[7]:0:0,'___');
if b=9then begin if RBP[9]<9.5
then Write(PN[9],RBP[9]:0:0,'_')
else Write(PN[9],RBP[9]:0:0)end;
if b<9then Write('___');Write('__');
for i:=1to 6do begin if RBP[i]<9.5
then Write(PN[i],RBP[i]:0:0,'_')
else Write(PN[i],RBP[i]:0:0)end;
Writeln('_') {M Mode} end; G3:
if(zP=1)and(Pi>2)then goto G5;
z0:=z0+1; G5: zP:=zP+1;
kP:=zP;while kP>=Pi do kP:=kP-Pi;
if kP>0then goto G4;
if(Rr='o')and(zr<7)and(Oo='o')then begin
if(Yy='_')then begin if Gn='r'then
Write(Re,'_ ')else Write(Re,' ');
for i:=1to 5do e[i]:=EcR[i]*mc;
Write(' ');for i:=1to 5do begin
if(e[i]>0)and(e[i]<0.95)then
Write('<',(e[i]*10):0:0,' ')else begin
if e[i]>=0then Write(' ');
if(e[i]<9.5)and(e[i]>=0)
then Write(e[i]:0:0,' ');
if(e[i]>9.5)and(e[i]>=0)
then Write(e[i]:0:0);
if(e[i]>-9.5)and(e[i]<0)
then Write(e[i]:0:0,' ');if(e[i]<-9.5)
then Write(e[i]:0:0)end end;
if(Zz='-')or(Zz='.')then begin
if Is='.'then begin Write(' ');
for i:=1to b do e[i]:=RBr[i]*mc;
for i:=1to 6do begin
if(e[i]>0)and(e[i]<0.95)then
Write('<',(e[i]*10):0:0,' ')else begin
if e[i]<0then begin
if e[i]<=-9.5then Write(e[i]:0:0);
if e[i]>-9.5then Write(e[i]:0:0,' ')end;
if e[i]>=0then begin if e[i]<9.5
then Write(' ',e[i]:0:0,' ');if e[i]>=9.5
then Write(' ',e[i]:0:0)end end end;
Writeln;Write(' ')end;case(Zz)of
'-':for i:=1to 5do e[i]:=Es0[i]*mc;
'.':for i:=1to 5do e[i]:=TmR[i]*mr end;
Write(' ');for i:=1to 5do begin
if(e[i]>0)and(e[i]<0.95)then
Write('<',(e[i]*10):0:0,' ')else begin
if e[i]>=0then Write(' ');
if(e[i]<9.5)and(e[i]>=0)
then Write(e[i]:0:0,' ');
if(e[i]>9.5)and(e[i]>=0)
then Write(e[i]:0:0);
if(e[i]>-9.5)and(e[i]<0)
then Write(e[i]:0:0,' ');
if(e[i]<-9.5)then
Write(e[i]:0:0)end end;
if(e[i]>9.5)or(e[i]>-9.5)then
Write(' ')else Write(' ')end;
if Is='.'then begin
for i:=1to 6do begin
if i=Mi then begin
if(e[7]>0)and(e[7]<0.95)then
Write('<',(e[7]*10):0:0)else begin
if e[7]<0then begin
if e[7]<=-9.5then Write(e[7]:0:0);
if e[7]>-9.5then Write(e[7]:0:0)end;
if e[7]>=0then begin if e[7]<9.5
then Write(' ',e[7]:0:0);if e[7]>=9.5
then Write(e[7]:0:0)end end end;
if (i>Mi)or(i<Mi)then Write(' ')end;
end;Writeln;
if ci='i'then begin
for i:=1to b do Mli[i]:=' ';
for i:=1to b do
if(Bei[i]='|')then Mli[Ep[i]]:='|';
for i:=1to b do if(i=Mi)or(i=7)then
Mli[Ep[i]]:='*';for i:=1to b do
if(Bei[i]='/')then Mli[Ep[i]]:='/';
Write(' ');for i:=1to 5do
Write(Mli[i],' ');Writeln end end end;
{P-1}
Ap[zr,kT]:=WgP*mr;
Ap[0,kT]:=Ap[0,kT]+Ap[zr,kT];
if WgP>0then Rp[zr,kT]:=1;
if WgP=0then Rp[zr,kT]:=0;
if(WgP<0)and(WgP>-99)then Rp[zr,kT]:=-1;
Rp[0,kT]:=Rp[0,kT]+Rp[zr,kT];
until zr=zu;
z:=z+1;until (o=0)or(kT=Sk)or(z=Ct); G1:
{P-2}
if Ed=':'then for i:=1to Ct do begin
if Rp[0,i]<0 then Rp[0,i]:=-2;
if Rp[0,i]>0 then Rp[0,i]:=1 end;
if Ed='.'then for i:=1to Ct do begin
r:=1;if zu>9then r:=9/zu;
Rp[0,i]:=Rp[0,i]/(1/r) end;
{RATINGS}if(Cs='r')and(Rr='o')and(zr=zu)
then begin Writeln;if St>0then Read(St);
if St>0then begin Readln;k:=1;k3:=1;
Readln(k2,kL);while i>0 do begin SLb:
Read(i);if(i=0)or(i=99)then begin
Read(a);for k1:=1to 7do Read(DSt[k,k1]);
k:=k+1;k3:=k3+1 end;SL0[i]:=SL0[i]+1;
if(i<9)and(SL0[i]=1)then
begin iL:=iL+1;Wh[iL]:=i end;
if(k2=k3-1)or(i=0)then goto SLs;
if i=99 then goto SLb;Read(j);
SL2[j]:=SL2[j]+1;SL[i,j]:='-';
if SLn[i,j]=0then SLn[i,j]:=k3
else SLf[i,j]:=SLf[i,j]+1 end;SLs:
if(St=6)or(St=7)then begin
Write('______');for i:=1to Ct do Write
('__',FSi[i],'_');Writeln('___');
Writeln(' ',
'1 2 3 4 5 6 7 8');
for i:=1to Ct do for j:=1to Ct do begin
if j=1then begin Write(' ',Rn[i],' ');
if op='p'then Write(' ')else
if op='o'then if FSi[i]='_'then
Write(' ')else Write(FSi[i],' ')end;
Write(SL[i,j],' ');
if j=Ct then Writeln end end;
if(St=6)or(St=8)then begin
Write('______');for i:=1to Ct do Write
('__',FSi[i],'_');Writeln('___');
Writeln(' ',
'1 2 3 4 5 6 7 8');
for i:=1to Ct do for j:=1to Ct do begin
if j=1then begin Write(' ',Rn[i],' ');
if op='p'then Write(' ')else
if op='o'then if FSi[i]='_'then
Write(' ')else Write(FSi[i],' ')end;
k3:=SLf[i,j];if k3=0then
Write(' ')else if k3>0then if k3>9
then Write(k3,' ')else Write(k3,' ');
if j=Ct then Writeln end{St=6/7:8}end;
{^/:}if(SL[D0[1],D0[2]]='-')then
SLf[D0[1],D0[2]]:=SLf[D0[1],D0[2]]+1;
if(SL[D0[2],D0[1]]='-')then
SLf[D0[2],D0[1]]:=SLf[D0[2],D0[1]]+1;
Writeln;Write(' ');
i:=0;for j:=1to 8do begin
Ap[i,j]:=Ap[i,j]/zu;
if(Ap[i,j]>=0)and(Ap[i,j]<9.5)then
Write(' ',Ap[i,j]:0:0,' ');
if Ap[i,j]>=9.5then
Write(' ',Ap[i,j]:0:0,' ');
if(Ap[i,j]<0)and(Ap[i,j]>-9.5)
then Write(Ap[i,j]:0:0,' ');
if(Ap[i,j]<0)and(Ap[i,j]<=-9.5)
then Write(Ap[i,j]:0:0,' ')end;Writeln;
Write('______');for i:=1to Ct do
Write('__',FSi[i],'_');Writeln('___');
Write(' ');
for i:=1to Ct do if SL0[i]>9then
Write(' ',SL0[i])else
Write(' ',SL0[i],' ');Writeln;
Write(' ');
for i:=1to Ct do if SL2[i]>9then
Write(' ',SL2[i])else
Write(' ',SL2[i],' ');Writeln;
Write('______');for i:=1to Ct do
if Xw[i]=0then Write('____')
else if Xw[i]>9then Write('__',Xw[i])else
Write('__',Xw[i],'_');Writeln('___');
if op='p'then Writeln(' ',
'1 2 4 5 10 11 13 14');
Writeln(' ',
'1 2 3 4 5 6 7 8');
for i:=1to Ct do for j:=1to Ct do begin
if j=1then begin
if op='o'then begin k3:=0;
if i=D0[1]then k3:=SLf[D0[1],D0[2]];
if i=D0[2]then k3:=SLf[D0[2],D0[1]];
if k3=0then Write(' ')else
if k3>0then if k3>9then
Write(k3,' ')else Write(k3,' ')end;
if op='p'then if Bo[i]>9then
Write(Bo[i],' ')else Write(Bo[i],' ');
Write(Rn[i],' ');
if op='p'then Write(' ')else
if op='o'then if FSi[i]='_'then
Write(' ')else Write(FSi[i],' ')end;
k3:=SLn[i,j];
if k3=0then Write(' ')else
if k3>0then if k3>9then Write(k3,' ')
else Write(k3,' ');
if j=Ct then Writeln end;
for i:=1to 41do Write('_');Writeln;
j:=0;if k>kL then k:=kL+1;
for i:=1to k-1do begin j:=j+1;
for k1:=1to 7do Write(DSt[i,k1]);
if i>99then jL:=3 else jL:=4;
Write(i,' ');if(j=jL)and(i<k-1)
then begin Writeln;j:=0 end end;
if kL>0then begin Writeln;
for i:=1to 41do Write('_');Writeln end;
Write(' ');
for i:=1to iL-1 do Write(Wh[i],' ');
Writeln;Write('0 ',St,' ');
Write('______________(',An,')');
Writeln('____________________');
Writeln(k2,' ',kL);
if Wn[1]=0then Writeln('66 66 ');
if Wn[1]>0then if Wn[1]=1then
Writeln(D0[1],' ',D0[2],' ')else
Writeln(D0[2],' ',D0[1],' ');
Write('99 ',Yr-2020,Db[3]);
if Mt>9then Write(Mt)else Write('0',Mt);
if Dy>9then Write(Dy)else Write('0',Dy);
Write(Db[4]);Write(' ');
if Dr>1then Write('-',Dr)else Write
(' ');Writeln(' ',D0[1],' ',D0[2]
,' ',D0[2],' ',D0[1],' '){St>0}end;
Sj:=0;for i:=1to 19do Write('_');
Writeln(I8[zr]);Write(oEo,Xx,oa,' ');
if Wn[1]=0then Write('?');for i:=1
to Cw-1 do Write(Wn[i],' ');Writeln;
Writeln('__________________',oE,
'____________________');
k:=0;for i:=1 to Ct do begin k:=k+1;
if Rn[i]>9then Write(' ',Rn[i],' ')else
Write(' ',Rn[i],' ');if(k=10)and(i<Ct)
then begin Writeln;k:=0 end end;Writeln;
for i:=1to 41do Write('_');Writeln;
k1:=1;k:=0;
if Ip='_'then rL:=zu else rL:=0;
for i:=0to rL do for j:=1to Ct do begin
if(i=1)and(j=1)then begin
for k2:=1to Ct do Write('_',
FSi[k2],'__');Writeln('_________');
if zu=1then goto Sk1 end;
k:=k+1;
if(Ap[i,j]>=0)and(Ap[i,j]<9.5)then
Write(' ',Ap[i,j]:0:0,' ');
if Ap[i,j]>=9.5then
Write(' ',Ap[i,j]:0:0,' ');
if(Ap[i,j]<0)and(Ap[i,j]>-9.5)
then Write(Ap[i,j]:0:0,' ');
if(Ap[i,j]<0)and(Ap[i,j]<=-9.5)
then Write(Ap[i,j]:0:0,' ');
if(j=Ct)or(k=10){and(j<Ct-1))}then
begin if j=Ct then Writeln(I5[i])
else Writeln;k1:=k1+1;k:=0 end end;
Sj:=Sj-k1;Writeln('____________',
'______',oE,'____________________');
k1:=1;k:=0;for i:=1to Ct do begin k:=k+1;
if Rp[0,i]=0then Write(' - ')else if
Rp[0,i]<0then Write(Rp[0,i]:0:0,' ')
else Write(' ',Rp[0,i]:0:0,' ');
if((k=10)and(Ct>10))then begin
Writeln;k1:=k1+1;k:=0 end end;Writeln;
for i:=1to 41do Write('_');Writeln;
if Yy='_'then Sj:=Sj-1;
for i:=1to Ct do Write(Lo[i],' ');
Writeln;for i:=1to Ct do
Write(Rn[i],' ');Writeln end; Sk1:
for i:=1to 20+Sj do Writeln End.