fork(1) download
  1. program Hrm_RaP;{zMar68-27 09/11/2024}
  2. label
  3. 0,1,2,3,G1,G2,G3,G4,G5,G6,Sk1,SLs;
  4. type
  5. DHc=array [0..399]of char;
  6. Int=array [0..399]of integer;
  7. DHv=array [0..399]of real;
  8. MGC=array [0..399,0..399]of real;
  9. GCI=array [0..399,0..399]of char;
  10. In2=array [0..399,0..399]of integer;
  11. var
  12. Hs,Vd,o1,o2,o3,o4:String;
  13. Pm,TNo:String[6];Ms,Ssn:String[4];
  14. Sp1,Sp2,SN1,SN2,oE:String[3];
  15.  
  16. i,j,k,H,L,b,Mi,Si,Oi,h1,h2,h1o,h2o,Wd,Fr,
  17. Er,Me,wt,x,y,z,u,v,m1,Ct,o,u0,v0,Hr,Dy,Mt
  18. ,Yr,sM,sY,Ya,Yo,Yl,Yn,Mn,Dn,Hn,Hi,Sn,xy,
  19. e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,
  20. aST,nD,za,Ho,Min,Po,Ns,zu,z0,zr,Pi,zP,kP,
  21. zF,xS,xP,yW,yP,xG,m2,kT,kR,pT,Sk,kz,An,Xj
  22. ,oEo,Sp,k1,k2,k3,Cw,Sj,rL,Cto,Kc,Lc,Cj,St
  23. ,oH,Rw,kL,jL,iL,f:integer;
  24. r,WgP,mc,mr,F2,r1:real;
  25. a,Sc,Oc,Mar,SAc,OAc,Sf,Md,c1,c3,s1,s2,s3,
  26. s4,u1,u2,u3,u4,Ii,Id,Ih,Ie,Is,B1,B2,uv,Pp
  27. ,Pe,sD,Al,vh,vb,Gn,Cs,Oo,Ip,Om,Xx,Co,Pw,
  28. on,Zz,Yy,Aa,ET,Cl,nr,Rr,Ed,B0,T0,He,Te,Se
  29. ,Ae,Re,PmL,oa,ci,op:char;
  30. Db,De,Hb,Be,Hel,Bb,BDc,PN,Bei,Hol,BMc,DCe
  31. ,T,aT,I1,I2,I3,I4,I5,I6,I7,I8,AEl,Woi,Mli
  32. :DHc;
  33. Ds,Bs,Es,Eg,Ec,G,C,G0,C0,S,Sa,Q,Bg,Bc,Ig,
  34. Ic,Fs,IgC,IcC,RBc,RBg,RBd,RBP,So,e,eE,Ts,
  35. ABs,En0,En,Es0,EcT,EcR,Wg,ETx,eW,F3L,RBo,
  36. RBs,RBm,RBr,TsS,TsM,Bso,TmR,RBa,TsA:DHv;
  37. Hp,Ng,Nc,T1,T2,T3,Ml,Bp,Ba,Ep,jW,jU,Lp,F0
  38. ,F1,Fx,Fz,Ro,Rn,Wn,Wh,La,Pc,Lo,Mo,Wo,Xw,
  39. SL0,SL1,SL2:Int;
  40. Wp,Up,SLn,SLf:In2;
  41. M,N,Na,No,Nh,Nha,D,Rp,Ap,Ar:MGC;
  42. BR,SL,DSt:GCI;
  43.  
  44. Begin Read(op);
  45. if op='o'then for i:=1to 5do Readln;
  46.  
  47. Readln;Read(Ii);for i:=1to 35do
  48. Read(a);Read(ci);Readln(Ct);
  49.  
  50. Cj:=Ct;if Ii='.'then begin Kc:=0;Lc:=0;
  51. if Ct<0then if Cj=-1then Readln(Ct)else
  52. begin Read(Cto);for i:=1to
  53. (Ct-1-(Ct*2))*4 do Readln;Readln(Ct)end;
  54. for i:=1to Ct do begin
  55. Read(k);T1[i]:=k end;Readln;
  56. for i:=1to Ct do begin
  57. Read(k);T2[i]:=k end;Readln;
  58. for i:=1to Ct do begin
  59. Read(k);Ml[i]:=k end;
  60. Write(' k=',k,' Cj=',Cj,' Cto=',Cto);
  61. if Cj<0 then begin while k>0 do Read(k);
  62. Read(Kc);Lc:=Kc+Cj end;
  63. Writeln(' Kc=',Kc,' Lc=',Lc);
  64. for i:=1to Ct do begin
  65. if(T1[i]>8)and(T1[i]<16)then
  66. T1[i]:=T1[i]-8;if T1[i]=16then T1[i]:=8;
  67. if T1[i]>16then T1[i]:=T1[i]-16;
  68. if(T2[i]>8)and(T2[i]<16)then
  69. T2[i]:=T2[i]-8;if T2[i]=16then T2[i]:=8;
  70. if T2[i]>16then T2[i]:=T2[i]-16;
  71. if(Ml[i]>6)and(Ml[i]<12)then
  72. Ml[i]:=Ml[i]-6;if Ml[i]=12then Ml[i]:=6;
  73. if(Ml[i]>12)and(Ml[i]<18)then
  74. Ml[i]:=Ml[i]-12;if Ml[i]=18then Ml[i]:=6;
  75. if Ml[i]>18then Ml[i]:=Ml[i]-18 end end;
  76.  
  77. i:=0;k:=1;if Ii='^'then begin
  78. while k>0 do begin Read(k);i:=i+1;
  79. T3[i]:=k end;Ct:=i-1 end;Readln;
  80.  
  81. if op='p'then for i:=1to 5do Readln;
  82.  
  83. for i:=1to 41do Write('_');Writeln;
  84. Readln(Sp);Read(Cl,a,a,a,sD,a,aST);
  85. for i:=1to 15do Read(a);
  86. Read(PmL,a,a,a,Co);
  87. Readln(a,a,a,a,a,Cs,a,a,a,a,a,a,Gn);
  88. Read(Id,a,a,Ip);for i:=1to 19do Read(a);
  89. Readln(ET,Zz,on,a,Is,a,oa,a,Ih,a,Md,a,
  90. Ie,An);Readln(oE,Hr,a,Min,a,a,Dy,a,a,
  91. Mt,a,a,Yr,a,Xx,Yy,nr,a,Rr,a,oEo,a,Pi);
  92.  
  93. Readln(Ns,a,a,Ssn,a,a,Pm,a,a,Sk,a,
  94. a,a,Yy,a,Zz,a,Aa,a,Ed,a,SN1,a,SN2,k);
  95. Read(a,a,TNo);for i:=1to 21do Read(a);
  96. Readln(T0,a,a,Sp1,a,Sp2,a,B0);
  97.  
  98. for i:=1to 40do Read(a);Readln(Om);
  99. if Om='m'then begin
  100. Readln(o1);Readln end;
  101. for i:=1to 10do begin
  102. Read(a,T[i],a,a);aT[i]:=T[i]end;
  103. for j:=1to k do begin
  104. if Om='n'then Readln;
  105. if Om='m'then begin case(j)of
  106. 1:Readln(o2);2:Readln(o3);3:Readln(o4)
  107. end;Readln;Readln;if j>3then Readln end;
  108. for i:=10*j+1to 10*j+10do begin
  109. Read(a,T[i],a,a);aT[i]:=T[i]end end;
  110. if Om='n'then Readln else
  111. begin Readln;Read(a)end;
  112.  
  113. if Cs='r'then begin
  114. for i:=1to 27do for j:=1to 27do
  115. SL[i,j]:=' ';
  116. for i:=1to Lc do Readln;
  117. k:=Ct;if ci='c'then k:=Cj;
  118. if Cj=27then for i:=1to Cj do Rn[i]:=i
  119. else for i:=1to k do Read(Rn[i]);
  120. if Cj=27then begin Readln;Co:='n'end;
  121. if Lc-Kc<-1then begin
  122. for i:=1to Kc-Lc-1 do Readln;
  123. for i:=1to Cto do Read(k)end;
  124. j:=0;k:=1;while k>0 do begin
  125. Read(k);j:=j+1;Wn[j]:=k;Cw:=j end;
  126. if Wn[1]=0then Read(k);
  127. Read(St);if St>0then begin
  128. Readln;Readln;Readln;
  129. j:=0;k:=1;while k>0 do begin
  130. Read(k);j:=j+1;Wh[j]:=k end end end;
  131.  
  132.  
  133. {S/D}Hr:=(Hr*100)+Min;
  134. if Id='D'then begin
  135. if sD='-'then aST:=aST+60;
  136. if sD='+'then begin
  137. aST:=60-aST;sD:='-'end end;
  138.  
  139. {IN CALENDAR Date Adj}
  140. for za:=0to 1do begin
  141.  
  142. {MONTH START}if Yr=2024then begin
  143. e1:=05116;e4:=15034;e7:=22586;e10:=04318;
  144. e2:=16374;e5:=08225;e8:=09057;e11:=07497;
  145. e3:=10215;e6:=12345;e9:=12277;e12:=00297
  146. end;case(Mt)of
  147. 1:xy:=e1;5:xy:=e5;9:xy:=e9;
  148. 2:xy:=e2;6:xy:=e6;10:xy:=e10;
  149. 3:xy:=e3;7:xy:=e7;11:xy:=e11;
  150. 4:xy:=e4;8:xy:=e8;12:xy:=e12 end;
  151. k:=0;while xy>=10 do begin
  152. k:=k+1;xy:=xy-10 end;x:=xy;y:=k;
  153.  
  154. sM:=0;
  155. if(Dy<x)or((Dy=x)and(Hr<=y))then sM:=1;
  156. if((Mt=2)and(sM=0))or(Mt>2)then sY:=0
  157. else sY:=1;
  158.  
  159. {CALENDAR CONVERSION}
  160. Db[8]:='W';Db[6]:='W';Db[5]:='w';
  161. Db[4]:='a';Db[2]:='a';Db[1]:='l';
  162. if(Yr>=1984)and(Yr<2044)then begin
  163. Db[7]:='W';Db[3]:='g';Yo:=1984 end;
  164.  
  165. Ya:=Yr-Yo;while Ya>60do Ya:=Ya-60;
  166. if sY=0 then Yn:=(Yr-Yo)+1 else
  167. Yn:=Yr-Yo;while Yn>60 do Yn:=Yn-60;
  168.  
  169. Mn:=(Ya*12)+Mt-sM;
  170. while Mn>60do Mn:=Mn-60;
  171.  
  172. Yl:=Ya;k:=0;while Yl>=4do begin
  173. k:=k+1;Yl:=Yl-4 end;if Yl>0then
  174. k:=k+1;if(Yl=0)and(Ya>0)then k:=k+1;
  175. Dn:=(Ya*365)+k;case(Mt)of
  176. 1:j:=0; 4:j:=90; 7:j:=181;10:j:=273;
  177. 2:j:=31;5:j:=120;8:j:=212;11:j:=304;
  178. 3:j:=59;6:j:=151;9:j:=243;12:j:=334 end;
  179. if(Yl=0)and(Mt=2)then j:=j-1;
  180. Dn:=Dn+j+Dy-1;while Dn>=60do Dn:=Dn-60;
  181.  
  182. if (Hr>=0) and(Hr<100) then Hi:=0;
  183. if (Hr>=100) and(Hr<300) then Hi:=1;
  184. if (Hr>=300) and(Hr<500) then Hi:=2;
  185. if (Hr>=500) and(Hr<700) then Hi:=3;
  186. if (Hr>=700) and(Hr<900) then Hi:=4;
  187. if (Hr>=900) and(Hr<1100)then Hi:=5;
  188. if (Hr>=1100)and(Hr<1300)then Hi:=6;
  189. if (Hr>=1300)and(Hr<1500)then Hi:=7;
  190. if (Hr>=1500)and(Hr<1700)then Hi:=8;
  191. if (Hr>=1700)and(Hr<1900)then Hi:=9;
  192. if (Hr>=1900)and(Hr<2100)then Hi:=10;
  193. if (Hr>=2100)and(Hr<2300)then Hi:=11;
  194. if (Hr>=2300)and(Hr<2400)then Hi:=12;
  195. Hn:=(Dn*12)+Hi;while Hn>=60do Hn:=Hn-60;
  196.  
  197. for i:=1to 4do begin case(i)of
  198. 1:j:=5;2:j:=6;3:j:=7;4:j:=8 end;case(i)of
  199. 1:Sn:=Yn;2:Sn:=Mn;3:Sn:=Dn;4:Sn:=Hn end;
  200. z:=0; 0:repeat
  201. if(Db[i]='a')or(Db[i]='c')or(Db[i]='e')
  202. or(Db[i]='g')or(Db[i]='i')or(Db[i]='k')
  203. then Pp:='+'else Pp:='-';
  204.  
  205. if Sn>0then begin
  206. if Pp='-'then case(Db[j])of
  207. 'W':Db[j]:='F';'F':Db[j]:='E';
  208. 'E':Db[j]:='M';'M':Db[j]:='w';
  209. 'w':Db[j]:='W'end;
  210. case(Db[i])of
  211. 'a':Db[i]:='b';'g':Db[i]:='h';
  212. 'b':Db[i]:='c';'h':Db[i]:='i';
  213. 'c':Db[i]:='d';'i':Db[i]:='j';
  214. 'd':Db[i]:='e';'j':Db[i]:='k';
  215. 'e':Db[i]:='f';'k':Db[i]:='l';
  216. 'f':Db[i]:='g';'l':Db[i]:='a'end end;
  217. z:=z+1;until(Sn=0)or(z=Sn)end;
  218.  
  219. if za=0 then begin
  220. {DATE ADJUSTMENT & Output}k:=0;
  221. if(Yl=0)and(Mt=2)then k:=1;case(Mt)of
  222. 1:nD:=31+k;5:nD:=31+k; 9:nD:=30+k;
  223. 2:nD:=28+k;6:nD:=30+k;10:nD:=31+k;
  224. 3:nD:=31+k;7:nD:=31+k;11:nD:=30+k;
  225. 4:nD:=30+k;8:nD:=31+k;12:nD:=31+k end;
  226. Write(' ',Ih,Cl,Ie,'(',Xx,') ');
  227. if aST>99then Write(aST,sD)
  228. else Write(' ',aST,sD);
  229. Write('(');if Hr<9then Write('000',Hr);
  230. if(Hr<99)and(Hr>9)then Write('00',Hr);
  231. if(Hr<999)and(Hr>99)then Write('0',Hr);
  232. if Hr>999then Write(Hr);Write(') (');
  233. if Dy>9then Write(Dy,')')
  234. else Write('0',Dy,')');Write(' ');
  235. if Mt>9then Write(Mt,' ')else
  236. Write('0',Mt,' ');Writeln(Yr);
  237. k:=0;while Hr>=100do begin
  238. k:=k+1;Hr:=Hr-100 end;Hr:=(60*k)+Hr;
  239.  
  240. if sD='+'then begin Hr:=Hr+aST;
  241. if Hr>1440then begin Hr:=Hr-1440;
  242. if Dy=nD then Dy:=1 else Dy:=Dy+1;
  243. if Dy=1then if Mt=12then
  244. Mt:=1 else Mt:=Mt+1;
  245. if(Mt=1)and(Dy=1)then Yr:=Yr+1 end end;
  246. if sD='-'then begin Hr:=Hr-aST;
  247. if Hr<0then begin if aST<=60then
  248. Hr:=(60-(Hr-(Hr*2)))+1380;if aST>60then
  249. Hr:=(120-(Hr-(Hr*2)))+1320;
  250. if Dy=1then Dy:=nD else Dy:=Dy-1;
  251. if Dy=nD then if Mt=1then
  252. Mt:=12 else Mt:=Mt-1;
  253. if(Mt=12)and(Dy=nD)then Yr:=Yr-1 end end;
  254.  
  255. k:=0;while Hr>=60do begin
  256. k:=k+1;Hr:=Hr-60 end;Hr:=(100*k)+Hr end;
  257.  
  258. if za=1then begin
  259. {HOUR/MONTH Change/Al/Ho MONITOR Output}
  260. Ho:=Hr;k:=0;while Ho>=100do begin
  261. k:=k+1;Ho:=Ho-100 end;Ho:=(60*k)+Ho;
  262. case(Hi)of 0:Ho:=60-Ho;
  263. 1:Ho:=180-Ho;7:Ho:= 900-Ho;
  264. 2:Ho:=300-Ho;8:Ho:=1020-Ho;
  265. 3:Ho:=420-Ho;9:Ho:=1140-Ho;
  266. 4:Ho:=540-Ho;10:Ho:=1260-Ho;
  267. 5:Ho:=660-Ho;11:Ho:=1380-Ho;
  268. 6:Ho:=780-Ho;12:Ho:=1440-Ho end;
  269. if((Ho>=0)and(Ho<10))
  270. or((Ho>=110)and(Ho<120))then Po:=0;
  271. if((Ho>10)and(Ho<=20))
  272. or((Ho>=100)and(Ho<110))then Po:=1;
  273. if((Ho>20)and(Ho<=30))
  274. or((Ho>=90)and(Ho<100))then Po:=2;
  275. if((Ho>30)and(Ho<=40))
  276. or((Ho>=80)and(Ho<90))then Po:=3;
  277. if((Ho>40)and(Ho<=50))
  278. or((Ho>=70)and(Ho<80))then Po:=4;
  279. if((Ho>50)and(Ho<=60))
  280. or((Ho>=60)and(Ho<70))then Po:=5;
  281. case(Hi)of 0:Al:='a';
  282. 1:Al:='b';5:Al:='f'; 9:Al:='j';
  283. 2:Al:='c';6:Al:='g';10:Al:='k';
  284. 3:Al:='d';7:Al:='h';11:Al:='l';
  285. 4:Al:='e';8:Al:='i';12:Al:='a'end;
  286. Write(' (');if Ho<10then Write('00',Ho);
  287. if(Ho<100)and(Ho>9)then Write('0',Ho);
  288. if Ho>99then Write(Ho);
  289. Write(')',Al,' ');
  290.  
  291. if y<10then Write('000',y);
  292. if(y<100)and(y>9)then Write('00',y);
  293. if(y<1000)and(y>99)then Write('0',y);
  294. if y>999then Write(y);
  295. Write('(');if Hr<=9then Write('000',Hr);
  296. if(Hr<99)and(Hr>9)then Write('00',Hr);
  297. if(Hr<999)and(Hr>99)then Write('0',Hr);
  298. if Hr>999then Write(Hr);
  299. Write(') ',x,'(');
  300. if Dy>9then Write(Dy,')')
  301. else Write('0',Dy,')');Write(' ');
  302. if Mt>9then Write(Mt,' ')else
  303. Write('0',Mt,' ');Writeln(Yr);Writeln(
  304. ' ',Db[8],' ',' ',
  305. Db[7],Db[3],' ',Db[6],Db[2],' ',
  306. Db[5],Db[1]);Writeln end {za} end;
  307.  
  308. vh:=Db[7];vb:=Db[3];
  309. if(vh='W')and((vb='a')or(vb='b'))
  310. or(vh='F')and((vb='c')or(vb='d'))
  311. or(vh='E')and((vb='e')or(vb='f'))
  312. or(vh='M')and((vb='g')or(vb='h'))
  313. or(vh='w')and((vb='i')or(vb='j'))
  314. then Vd:=('kl');
  315. if(vh='W')and((vb='k')or(vb='l'))
  316. or(vh='F')and((vb='a')or(vb='b'))
  317. or(vh='E')and((vb='c')or(vb='d'))
  318. or(vh='M')and((vb='e')or(vb='f'))
  319. or(vh='w')and((vb='g')or(vb='h'))
  320. then Vd:=('ij');
  321. if(vh='W')and((vb='i')or(vb='j'))
  322. or(vh='F')and((vb='k')or(vb='l'))
  323. or(vh='E')and((vb='a')or(vb='b'))
  324. or(vh='M')and((vb='c')or(vb='d'))
  325. or(vh='w')and((vb='e')or(vb='f'))
  326. then Vd:=('gh');
  327. if(vh='W')and((vb='g')or(vb='h'))
  328. or(vh='F')and((vb='i')or(vb='j'))
  329. or(vh='E')and((vb='k')or(vb='l'))
  330. or(vh='M')and((vb='a')or(vb='b'))
  331. or(vh='w')and((vb='c')or(vb='d'))
  332. then Vd:=('ef');
  333. if(vh='W')and((vb='e')or(vb='f'))
  334. or(vh='F')and((vb='g')or(vb='h'))
  335. or(vh='E')and((vb='i')or(vb='j'))
  336. or(vh='M')and((vb='k')or(vb='l'))
  337. or(vh='w')and((vb='a')or(vb='b'))
  338. then Vd:=('cd');
  339. if(vh='W')and((vb='c')or(vb='d'))
  340. or(vh='F')and((vb='e')or(vb='f'))
  341. or(vh='E')and((vb='g')or(vb='h'))
  342. or(vh='M')and((vb='i')or(vb='j'))
  343. or(vh='w')and((vb='k')or(vb='l'))
  344. then Vd:=('ab');
  345.  
  346.  
  347. {zr LOOPS}
  348. for i:=0to b do ABs[i]:=0;
  349. for i:=1to 10do Wg[i]:=0;
  350. for i:=1to Ct do Woi[i]:='_';
  351. for i:=1to 27 do begin
  352. SL1[i]:=0;SL0[i]:=0;SL2[i]:=0 end;
  353.  
  354. z:=0;z0:=0;zP:=0; 1:repeat
  355.  
  356. for i:=1to 5do Wg[i]:=0;
  357.  
  358. zr:=0; 2:repeat zr:=zr+1;
  359.  
  360. {Xx MODES}
  361. if Xx='t'then begin zu:=3;case(zr)of
  362. 1:oEo:=7;2:oEo:=0;3:oEo:=8 end end;
  363. if Xx='d'then begin zu:=2;
  364. case(zr)of 1:oEo:=7;2:oEo:=0 end end;
  365. if Xx='s'then zu:=1;
  366. case(oEo)of 0:Ms:='nEo';
  367. 1:Ms:='nTr';4:Ms:='zTs';7:Ms:='nMm';
  368. 2:Ms:='zTr';5:Ms:='nMr';8:Ms:='zMm';
  369. 3:Ms:='nTs';6:Ms:='zMr';9:Ms:='nEr'end;
  370. on:=Ms[1];ET:=Ms[2];Gn:=Ms[3];
  371.  
  372. case(Pi)of-1:Pi:=161;-2:Pi:=314;
  373. -3:Pi:=809;-4:Pi:=1618;-5:Pi:=3141;
  374. -6:Pi:=8090;-7:Pi:=16180;-8:Pi:=31415;
  375. -9:Pi:=32767 end;
  376. if on='z'then oE[1]:='z';
  377. if ET='T'then oE[2]:=' 'else oE[2]:=ET;
  378. if Gn='r'then oE[3]:=' 'else oE[3]:=Gn;
  379.  
  380. {I1-I8 Loop Ind}
  381. if Ih='_'then I1[zr]:=' 'else I1[zr]:=Ih;
  382. if Cl='_'then I2[zr]:=' 'else I2[zr]:=Cl;
  383. if Ie='*'then I3[zr]:=' 'else I3[zr]:=Ie;
  384.  
  385. if on='z'then
  386. I4[zr]:='z'else I4[zr]:=' ';
  387. if ET='T'then I5[zr]:=' 'else I5[zr]:=ET;
  388. if Gn='r'then I6[zr]:=' 'else I6[zr]:=Gn;
  389. if oa='.'then
  390. I7[zr]:=' 'else I7[zr]:=':';
  391.  
  392. I8[zr]:='?';case(Pi)of 1:I8[zr]:=' ';
  393. 161:I8[zr]:='!';8090:I8[zr]:='(';
  394. 314:I8[zr]:='|';16180:I8[zr]:=')';
  395. 809:I8[zr]:='/';31415:I8[zr]:='^';
  396. 1618:I8[zr]:='<';32767:I8[zr]:='*';
  397. 3141:I8[zr]:='>'end;
  398.  
  399. mc:=30;if(on='z')or(ET='E')then mc:=10;
  400. mr:=10;if Pi=1then mc:=10;
  401.  
  402.  
  403. if Ii='.'then begin L:=Ml[z+1];
  404. H:=(T1[z+1]*10)+T2[z+1];o:=(H*10)+L end;
  405.  
  406. if Ii='^'then begin o:=T3[z+1];
  407. if o=0then goto G1;L:=o;k:=0;
  408. while L>=10do begin k:=k+1;L:=L-10 end;
  409. H:=k;L:=o-(H*10)end;
  410.  
  411. case(o)of
  412. 666:oH:=1;661:oH:=2;662:oH:=3;
  413. 676:oH:=4;671:oH:=5;672:oH:=6;
  414. 686:oH:=7;681:oH:=8;682:oH:=9;
  415. 766:oH:=10;761:oH:=11;762:oH:=12;
  416. 776:oH:=13;771:oH:=14;772:oH:=15;
  417. 786:oH:=16;781:oH:=17;782:oH:=18;
  418. 866:oH:=19;861:oH:=20;862:oH:=21;
  419. 876:oH:=22;871:oH:=23;872:oH:=24;
  420. 886:oH:=25;881:oH:=26;882:oH:=27 end;
  421. Lo[z+1]:=o;Mo[z+1]:=oH;Wo[z+1]:=oH;
  422.  
  423.  
  424. {Mi}case(L)of 1:Mi:=1;2:Mi:=2;
  425. 3:Mi:=3;4:Mi:=4;5:Mi:=5;6:Mi:=6 end;
  426.  
  427. {Hrm DEF:11 - 88}Hb[0]:=' ';case(H)of
  428. 11:Hs:='acegik oo bbbhhh 6 00 00 7 M';
  429. 12:Hs:='aceljh fo bbbiik 5 21 00 8 E';
  430. 13:Hs:='acejhf oo bbbkik 3 00 00 7 M';
  431. 14:Hs:='acegik oo bbbbjf 4 00 00 7 E';
  432. 15:Hs:='acehfd jo bbbgaa 1 31 00 8 W';
  433. 16:Hs:='aceika fo bbblld 4 21 00 8 E';
  434. 17:Hs:='acekac gi bbbjfj 2 21 31 9 E';
  435. 18:Hs:='aceblj fo bbbgkc 3 21 00 8 E';
  436.  
  437. 21:Hs:='fdbgik ao ccehhh 5 51 00 8 E';
  438. 22:Hs:='fdbljh oo cceiik 6 00 00 7 M';
  439. 23:Hs:='fdbjhf ao ccekik 4 50 00 8 E';
  440. 24:Hs:='fdbgik lo ccebjf 3 40 00 8 M';
  441. 25:Hs:='fdbhfd ia ccegaa 4 31 50 9 E';
  442. 26:Hs:='fdbika oo ccelld 1 00 00 7 w';
  443. 27:Hs:='fdbkac io ccejfj 3 31 00 8 E';
  444. 28:Hs:='fdbblj oo ccegkc 2 00 00 7 E';
  445.  
  446. 31:Hs:='dblgik oo ecehhh 3 00 00 7 F';
  447. 32:Hs:='dblljh go eceiik 4 30 00 8 w';
  448. 33:Hs:='dbljhf oo ecekik 6 00 00 7 F';
  449. 34:Hs:='dblgik oo ecebjf 5 00 00 7 w';
  450. 35:Hs:='dblhfd jo ecegaa 2 30 00 8 W';
  451. 36:Hs:='dblika go ecelld 3 30 00 8 w';
  452. 37:Hs:='dblkac gi ecejfj 1 20 30 9 E';
  453. 38:Hs:='dblblj go ecegkc 4 30 00 8 w';
  454.  
  455. 41:Hs:='acegik oo hdlhhh 4 00 00 7 W';
  456. 42:Hs:='aceljh go hdliik 3 40 00 8 W';
  457. 43:Hs:='acejhf oo hdlkik 5 00 00 7 W';
  458. 44:Hs:='acegik oo hdlbjf 6 00 00 7 W';
  459. 45:Hs:='acehfd jo hdlgaa 3 31 00 8 W';
  460. 46:Hs:='aceika go hdllld 2 30 00 8 w';
  461. 47:Hs:='acekac jf hdljfj 4 31 50 9 W';
  462. 48:Hs:='aceblj fo hdlgkc 1 21 00 8 E';
  463.  
  464. 51:Hs:='bljgik co agghhh 1 21 00 8 M';
  465. 52:Hs:='bljljh cg aggiik 4 21 40 9 W';
  466. 53:Hs:='bljjhf do aggkik 2 10 00 8 F';
  467. 54:Hs:='bljgik co aggbjf 3 21 00 8 W';
  468. 55:Hs:='bljhfd oo agggaa 6 00 00 7 W';
  469. 56:Hs:='bljika cg agglld 5 21 40 9 W';
  470. 57:Hs:='bljkac fo aggjfj 3 50 00 8 W';
  471. 58:Hs:='bljblj cg agggkc 4 21 40 9 W';
  472.  
  473. 61:Hs:='ceggik lo ffjhhh 4 30 00 8 F';
  474. 62:Hs:='cegljh oo ffjiik 1 00 00 7 M';
  475. 63:Hs:='cegjhf lo ffjkik 3 30 00 8 F';
  476. 64:Hs:='ceggik ao ffjbjf 2 10 00 8 W';
  477. 65:Hs:='ceghfd lj ffjgaa 5 30 41 9 F';
  478. 66:Hs:='cegika oo ffjlld 6 00 00 7 w';
  479. 67:Hs:='cegkac jo ffjjfj 4 41 00 8 F';
  480. 68:Hs:='cegblj oo ffjgkc 3 00 00 7 w';
  481.  
  482. 71:Hs:='egigik ac dldhhh 2 10 20 9 M';
  483. 72:Hs:='egiljh do dldiik 3 20 00 8 M';
  484. 73:Hs:='egijhf dl dldkik 1 10 31 9 F';
  485. 74:Hs:='egigik dl dldbjf 4 20 40 9 M';
  486. 75:Hs:='egihfd ao dldgaa 3 50 00 8 E';
  487. 76:Hs:='egiika do dldlld 4 20 00 8 M';
  488. 77:Hs:='egikac oo dldjfj 6 00 00 7 E';
  489. 78:Hs:='egiblj do dldgkc 5 20 00 8 M';
  490.  
  491. 81:Hs:='hfdgik ao aeihhh 3 10 00 8 M';
  492. 82:Hs:='hfdljh oo aeiiik 2 00 00 7 M';
  493. 83:Hs:='hfdjhf ao aeikik 4 10 00 8 M';
  494. 84:Hs:='hfdgik ao aeibjf 1 10 00 8 W';
  495. 85:Hs:='hfdhfd ai aeigaa 4 10 50 9 M';
  496. 86:Hs:='hfdika oo aeilld 3 00 00 7 E';
  497. 87:Hs:='hfdkac io aeijfj 5 50 00 8 M';
  498. 88:Hs:='hfdblj oo aeigkc 6 00 00 7 E'end;
  499.  
  500. for i:=1to 9do Hb[i]:=Hs[i];
  501. Hb[7]:=Hs[L+10];
  502. case(Hs[18])of
  503. '1':Si:=1;'2':Si:=2;'3':Si:=3;
  504. '4':Si:=4;'5':Si:=5;'6':Si:=6 end;
  505. case(Hs[20])of
  506. '0':h1:=0;'1':h1:=1;'2':h1:=2;
  507. '3':h1:=3;'4':h1:=4;'5':h1:=5 end;
  508. case(Hs[21])of '0':h1o:=0;'1':h1o:=1 end;
  509. case(Hs[23])of
  510. '0':h2:=0;'1':h2:=1;'2':h2:=2;
  511. '3':h2:=3;'4':h2:=4;'5':h2:=5 end;
  512. case(Hs[24])of '0':h2o:=0;'1':h2o:=1 end;
  513. case(Hs[26])of
  514. '7':b:=7;'8':b:=8;'9':b:=9 end;
  515. Pe:=Hs[28];
  516.  
  517.  
  518. {Oi}if Si<4then Oi:=Si+3 else Oi:=Si-3;
  519. {Hel : Hid Elm label}
  520. for i:=1to 6do Hel[i]:=' ';
  521. for i:=1to 6do begin
  522. if i=h1 then Hel[i]:=Hb[8];
  523. if i=h2 then Hel[i]:=Hb[9] end;
  524.  
  525.  
  526. {STRENGTH ALLOCATION: Q}
  527. Q[1]:=1; {o >}Q[2]:=0.5;{<}
  528. Q[3]:=0.25;{v }Q[4]:=0.1;{x}
  529.  
  530. {FOUR PILLARS Step: S}S[1]:=1;
  531. S[2]:=1; S[3]:=5/6; S[4]:=4/6;
  532.  
  533.  
  534. {FOUR PILLARS Date Strength}
  535. for i:=1to 8do begin case(Db[i])of
  536. 'a':De[i]:='w';'b':De[i]:='E';
  537. 'c':De[i]:='W';'d':De[i]:='W';
  538. 'e':De[i]:='E';'f':De[i]:='F';
  539. 'g':De[i]:='F';'h':De[i]:='E';
  540. 'i':De[i]:='M';'j':De[i]:='M';
  541. 'k':De[i]:='E';'l':De[i]:='w';
  542. 'W':De[i]:='W';'F':De[i]:='F';
  543. 'E':De[i]:='E';'M':De[i]:='M';
  544. 'w':De[i]:='w'end end;
  545.  
  546. for i:=1to 8do for j:=1to 8do D[i,j]:=1;
  547. D[1,2]:=S[2];D[2,1]:=S[2];D[3,1]:=S[3];
  548. D[1,3]:=S[3];D[2,3]:=S[2];D[3,2]:=S[2];
  549. D[1,4]:=S[4];D[2,4]:=S[3];D[3,4]:=S[2];
  550. D[1,5]:=S[1];D[2,5]:=S[2];D[3,5]:=S[3];
  551. D[1,6]:=S[2];D[2,6]:=S[1];D[3,6]:=S[2];
  552. D[1,7]:=S[3];D[2,7]:=S[2];D[3,7]:=S[1];
  553. D[1,8]:=S[4];D[2,8]:=S[3];D[3,8]:=S[2];
  554.  
  555. D[4,1]:=S[4];D[5,1]:=S[1];D[6,1]:=S[2];
  556. D[4,2]:=S[3];D[5,2]:=S[2];D[6,2]:=S[1];
  557. D[4,3]:=S[2];D[5,3]:=S[3];D[6,3]:=S[2];
  558. D[4,5]:=S[4];D[5,4]:=S[4];D[6,4]:=S[3];
  559. D[4,6]:=S[3];D[5,6]:=S[2];D[6,5]:=S[2];
  560. D[4,7]:=S[2];D[5,7]:=S[3];D[6,7]:=S[2];
  561. D[4,8]:=S[1];D[5,8]:=S[4];D[6,8]:=S[3];
  562.  
  563. D[7,1]:=S[3];D[8,1]:=S[4];
  564. D[7,2]:=S[2];D[8,2]:=S[3];
  565. D[7,3]:=S[1];D[8,3]:=S[2];
  566. D[7,4]:=S[2];D[8,4]:=S[1];
  567. D[7,5]:=S[3];D[8,5]:=S[4];
  568. D[7,6]:=S[2];D[8,6]:=S[3];
  569. D[7,8]:=S[2];D[8,7]:=S[2];
  570.  
  571. for i:=1to 8do Ds[i]:=0;
  572. for i:=1to 8do for j:=1to 8do
  573. if(i>j)or(i<j)then begin
  574. if De[i]='W'then case(De[j])of
  575. 'w':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
  576. 'W':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
  577. 'F':Ds[i]:=Ds[i]+(D[i,j]*Q[2]);
  578. 'E':Ds[i]:=Ds[i]+(D[i,j]*Q[3]);
  579. 'M':Ds[i]:=Ds[i]+(D[i,j]*Q[4])end;
  580. if De[i]='F'then case(De[j])of
  581. 'W':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
  582. 'F':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
  583. 'E':Ds[i]:=Ds[i]+(D[i,j]*Q[2]);
  584. 'M':Ds[i]:=Ds[i]+(D[i,j]*Q[3]);
  585. 'w':Ds[i]:=Ds[i]+(D[i,j]*Q[4])end;
  586. if De[i]='E'then case(De[j])of
  587. 'F':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
  588. 'M':Ds[i]:=Ds[i]+(D[i,j]*Q[2]);
  589. 'w':Ds[i]:=Ds[i]+(D[i,j]*Q[3]);
  590. 'W':Ds[i]:=Ds[i]+(D[i,j]*Q[4])end;
  591. if(De[i]='E')and(De[j]='E')then begin
  592. if(Db[i]='b')and(Db[j]='h')or
  593. (Db[i]='h')and(Db[j]='b')or
  594. (Db[i]='e')and(Db[j]='k')or
  595. (Db[i]='k')and(Db[j]='e')then
  596. Ds[i]:=Ds[i]+(D[i,j]*Q[4])else
  597. Ds[i]:=Ds[i]+(D[i,j]*Q[1])end;
  598. if De[i]='M'then case(De[j])of
  599. 'E':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
  600. 'M':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
  601. 'w':Ds[i]:=Ds[i]+(D[i,j]*Q[2]);
  602. 'W':Ds[i]:=Ds[i]+(D[i,j]*Q[3]);
  603. 'F':Ds[i]:=Ds[i]+(D[i,j]*Q[4])end;
  604. if De[i]='w'then case (De[j])of
  605. 'M':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
  606. 'w':Ds[i]:=Ds[i]+(D[i,j]*Q[1]);
  607. 'W':Ds[i]:=Ds[i]+(D[i,j]*Q[2]);
  608. 'F':Ds[i]:=Ds[i]+(D[i,j]*Q[3]);
  609. 'E':Ds[i]:=Ds[i]+(D[i,j]*Q[4])end end;
  610.  
  611. for i:=1to 8do begin
  612. if i=5then Ds[i]:=Ds[i]*(4/5)*(2/3);
  613. if i=1then Ds[i]:=Ds[i]*(4/5);
  614. if i=6then Ds[i]:=Ds[i]{*4/3}*(2/3);
  615. if i=2then Ds[i]:=Ds[i]*(4/3);
  616. if i=7then Ds[i]:=Ds[i]*(2/3);
  617. if i=8then Ds[i]:=Ds[i]*(7/10)*(3/6);
  618. if i=4then Ds[i]:=Ds[i]*(7/10);
  619. if Db[i]='o'then Ds[i]:=0 end;
  620. {Hrm branches Date strg}Be[0]:=' ';
  621. for i:=1to b do begin case(Hb[i])of
  622. 'a':Be[i]:='w';'b':Be[i]:='E';
  623. 'c':Be[i]:='W';'d':Be[i]:='W';
  624. 'e':Be[i]:='E';'f':Be[i]:='F';
  625. 'g':Be[i]:='F';'h':Be[i]:='E';
  626. 'i':Be[i]:='M';'j':Be[i]:='M';
  627. 'k':Be[i]:='E';'l':Be[i]:='w'end end;
  628.  
  629. for i:=1to b do for j:=1to 8do M[i,j]:=0;
  630. for i:=1to b do for j:=1to 8do begin
  631. if Be[i]='W'then case(De[j])of
  632. 'w':M[i,j]:=Q[1];'W':M[i,j]:=Q[1];
  633. 'F':M[i,j]:=Q[2];'E':M[i,j]:=Q[3];
  634. 'M':M[i,j]:=Q[4]end;
  635. if Be[i]='F'then case(De[j])of
  636. 'W':M[i,j]:=Q[1];'F':M[i,j]:=Q[1];
  637. 'E':M[i,j]:=Q[2];'M':M[i,j]:=Q[3];
  638. 'w':M[i,j]:=Q[4]end;
  639. if Be[i]='E'then case(De[j])of
  640. 'F':M[i,j]:=Q[1];'M':M[i,j]:=Q[2];
  641. 'w':M[i,j]:=Q[3];'W':M[i,j]:=Q[4]end;
  642. if(Be[i]='E')and(De[j]='E')then begin
  643. if(Hb[i]='b')and(Db[j]='h')or
  644. (Hb[i]='h')and(Db[j]='b')or
  645. (Hb[i]='e')and(Db[j]='k')or
  646. (Hb[i]='k')and(Db[j]='e')then
  647. M[i,j]:=Q[4]else M[i,j]:=Q[1]end;
  648. if Be[i]='M'then case(De[j])of
  649. 'E':M[i,j]:=Q[1];'M':M[i,j]:=Q[1];
  650. 'w':M[i,j]:=Q[2];'W':M[i,j]:=Q[3];
  651. 'F':M[i,j]:=Q[4]end;
  652. if Be[i]='w'then case(De[j])of
  653. 'M':M[i,j]:=Q[1];'w':M[i,j]:=Q[1];
  654. 'W':M[i,j]:=Q[2];'F':M[i,j]:=Q[3];
  655. 'E':M[i,j]:=Q[4]end end;
  656.  
  657. {Bs}for i:=1to 19do Bs[i]:=0;
  658. for i:=1to b do for j:=1to 8do
  659. begin Bs[i]:=Bs[i]+(Ds[j]*M[i,j])end;
  660. {Bs %}Bs[0]:=0;for i:=1to b do
  661. Bs[0]:=Bs[0]+Bs[i];for i:=1to b do
  662. Bs[i]:=((Bs[i]*100)/Bs[0])/100;Pw:='_';
  663.  
  664.  
  665. {Elm order by Self pos - 3}
  666. if Be[Si]='W'then begin
  667. Wd:=3; Fr:=4;Er:=5;Me:=1;wt:=2 end;
  668. if Be[Si]='F'then begin
  669. Wd:=2; Fr:=3;Er:=4;Me:=5;wt:=1 end;
  670. if Be[Si]='E'then begin
  671. Wd:=1; Fr:=2;Er:=3;Me:=4;wt:=5 end;
  672. if Be[Si]='M'then begin
  673. Wd:=5; Fr:=1;Er:=2;Me:=3;wt:=4 end;
  674. if Be[Si]='w' then begin
  675. Wd:=4; Fr:=5;Er:=1;Me:=2;wt:=3 end;
  676.  
  677. {Bp : Brch pos/no in Elm spread/SELF}
  678. for i:=1to b do case(Be[i])of
  679. 'W':Bp[i]:=Wd;'F':Bp[i]:=Fr;
  680. 'E':Bp[i]:=Er;'M':Bp[i]:=Me;
  681. 'w':Bp[i]:=wt end;
  682. {Bp : Brch pos/no in Elm spread/Ts}
  683. for i:=1to b do case(Be[i])of
  684. 'W':Ep[i]:=1;'F':Ep[i]:=2;
  685. 'E':Ep[i]:=3;'M':Ep[i]:=4;
  686. 'w':Ep[i]:=5 end;
  687.  
  688. {BR : Bch/Bch relation}
  689. Be[b+9]:='W';Be[b+10]:='F';Be[b+11]:='E';
  690. Be[b+12]:='M';Be[b+13]:='w';
  691.  
  692. for i:=0to b+8+5do for j:=0to b+8+5do
  693. BR[i,j]:=' ';for i:=1to 8do begin
  694. Be[b+i]:=De[i];Hb[b+i]:=Db[i] end;
  695.  
  696. for i:=0to b+8+5do for j:=0to b+8+5do
  697. begin if(Be[i]=' ')or(Be[j]=' ')then
  698. BR[i,j]:=' ';
  699. if Be[i]='W'then case(Be[j])of
  700. 'W':BR[i,j]:='o';'F':BR[i,j]:='<';
  701. 'E':BR[i,j]:='v';'M':BR[i,j]:='x';
  702. 'w':BR[i,j]:='>'end;
  703. if Be[i]='F'then case(Be[j])of
  704. 'W':BR[i,j]:='>';'F':BR[i,j]:='o';
  705. 'E':BR[i,j]:='<';'M':BR[i,j]:='v';
  706. 'w':BR[i,j]:='x'end;
  707. if Be[i]='E'then case(Be[j])of
  708. 'W':BR[i,j]:='x';'F':BR[i,j]:='>';
  709. 'M':BR[i,j]:='<';'w':BR[i,j]:='v'end;
  710. if(Be[i]='E')and(Be[j]='E')then begin
  711. if(Hb[i]='b')and(Hb[j]='h')or
  712. (Hb[i]='h')and(Hb[j]='b')or
  713. (Hb[i]='e')and(Hb[j]='k')or
  714. (Hb[i]='k')and(Hb[j]='e')then
  715. BR[i,j]:='*'else BR[i,j]:='o';
  716. if Hb[i]=Hb[j]then BR[i,j]:='O'end;
  717. if Be[i]='M'then case(Be[j])of
  718. 'W':BR[i,j]:='v';'F':BR[i,j]:='x';
  719. 'E':BR[i,j]:='>';'M':BR[i,j]:='o';
  720. 'w':BR[i,j]:='<'end;
  721. if Be[i]='w'then case(Be[j])of
  722. 'W':BR[i,j]:='<';'F':BR[i,j]:='v';
  723. 'E':BR[i,j]:='x';'M':BR[i,j]:='>';
  724. 'w':BR[i,j]:='o'end end;
  725.  
  726. {Bb : Branch bind to Date}
  727. for i:=0to b do Bb[i]:=' ';
  728. for j:=1to 4do for i:=1to b do
  729. if(Hb[i]='a')and(Db[j]='b')or
  730. (Hb[i]='b')and(Db[j]='a')or
  731. (Hb[i]='c')and(Db[j]='l')or
  732. (Hb[i]='l')and(Db[j]='c')or
  733. (Hb[i]='d')and(Db[j]='k')or
  734. (Hb[i]='k')and(Db[j]='d')or
  735. (Hb[i]='e')and(Db[j]='j')or
  736. (Hb[i]='j')and(Db[j]='e')or
  737. (Hb[i]='f')and(Db[j]='i')or
  738. (Hb[i]='i')and(Db[j]='f')or
  739. (Hb[i]='g')and(Db[j]='h')or
  740. (Hb[i]='h')and(Db[j]='g')then
  741. Bb[i]:='~';
  742.  
  743. {ACTIVE Line}for i:=1to 9do La[i]:=0;
  744. for i:=1to b do
  745. if((h1=Mi)and(i=8))or((h2=Mi)and(i=9))
  746. or(i=Mi)or(i=7)then La[i]:=1;
  747.  
  748. {DAY CLASH : Active line - BDc}
  749. for i:=1to b do BDc[i]:=' ';
  750. for i:=1to b do
  751. if(Hb[i]='a')and(Db[3]='g')or
  752. (Hb[i]='b')and(Db[3]='h')or
  753. (Hb[i]='c')and(Db[3]='i')or
  754. (Hb[i]='d')and(Db[3]='j')or
  755. (Hb[i]='e')and(Db[3]='k')or
  756. (Hb[i]='f')and(Db[3]='l')or
  757. (Hb[i]='g')and(Db[3]='a')or
  758. (Hb[i]='h')and(Db[3]='b')or
  759. (Hb[i]='i')and(Db[3]='c')or
  760. (Hb[i]='j')and(Db[3]='d')or
  761. (Hb[i]='k')and(Db[3]='e')or
  762. (Hb[i]='l')and(Db[3]='f')then
  763. BDc[i]:='|';
  764.  
  765. {BRANCH CLASHED by Act line : BMc/DCe}
  766. for i:=1to b do begin
  767. BMc[i]:=' ';DCe[i]:=' ' end;
  768. for i:=1to b do for j:=1to b do
  769. if(Hb[i]='a')and(Hb[j]='g')or
  770. (Hb[i]='b')and(Hb[j]='h')or
  771. (Hb[i]='c')and(Hb[j]='i')or
  772. (Hb[i]='d')and(Hb[j]='j')or
  773. (Hb[i]='e')and(Hb[j]='k')or
  774. (Hb[i]='f')and(Hb[j]='l')or
  775. (Hb[i]='g')and(Hb[j]='a')or
  776. (Hb[i]='h')and(Hb[j]='b')or
  777. (Hb[i]='i')and(Hb[j]='c')or
  778. (Hb[i]='j')and(Hb[j]='d')or
  779. (Hb[i]='k')and(Hb[j]='e')or
  780. (Hb[i]='l')and(Hb[j]='f')then
  781. begin if La[j]=1 then BMc[i]:='*';
  782. if(BDc[j]='|')and(Hb[i]=Db[3])
  783. then DCe[i]:='-'end;
  784.  
  785. {ACTIVE Branch}for i:=1to 9do Ba[i]:=0;
  786. for i:=1to b do begin a:=BMc[i];
  787. if Ie='_'then if a='*'then a:=' ';
  788. if(BDc[i]='|')or(a='*')or(La[i]=1)
  789. then Ba[i]:=1 end;
  790.  
  791. Mar:=' ';
  792. if((Hb[Mi]='c')and(Hb[7]='d'))or
  793. ((Hb[Mi]='f')and(Hb[7]='g'))or
  794. ((Hb[Mi]='i')and(Hb[7]='j'))or
  795. ((Hb[Mi]='l')and(Hb[7]='a'))then
  796. Mar:='A';
  797. if((Hb[Mi]='d')and(Hb[7]='c'))or
  798. ((Hb[Mi]='g')and(Hb[7]='f'))or
  799. ((Hb[Mi]='j')and(Hb[7]='i'))or
  800. ((Hb[Mi]='a')and(Hb[7]='l'))then
  801. Mar:='R';
  802. {INC/DEC : Adv/Ret - BDc|/}
  803. for i:=1to b do if((i=Mi)or(i=7))
  804. and(Mar='A')then Bs[i]:=Bs[i]*1.25;
  805. for i:=1to b do if((i=Mi)or(i=7))
  806. and(Mar='R')then Bs[i]:=Bs[i]*0.75;
  807.  
  808. for i:=1to b do if(BDc[i]='|')and
  809. (((h1=Mi)and(i=8))or((h2=Mi)and(i=9))
  810. or(i=Mi)or(i=7))then begin
  811. BDc[i]:='/';Bs[i]:=Bs[i]*3/4 end;
  812.  
  813.  
  814. {Hid Branch IN/OUT ind : h1o/h2o}
  815. if(h1>0)and(h1o=1)then h1o:=1
  816. else h1o:=0;
  817. if(h2>0)and(h2o=1)then h2o:=1
  818. else h2o:=0;
  819.  
  820. if Ih='_'then begin
  821. for i:=1to b do begin
  822. if(h1o=1)or((BR[8,i]='>')and(Ba[i]=1))
  823. then h1o:=2;
  824. if(h2o=1)or((BR[9,i]='>')and(Ba[i]=1))
  825. then h2o:=2 end end;
  826.  
  827. {Hol : Hid Branch NOT/OUT label}
  828. if h1o>0then Hol[8]:=' 'else Hol[8]:='_';
  829. if h2o>0then Hol[9]:=' 'else Hol[9]:='_';
  830.  
  831.  
  832. {INT STEP : So S Sa - Hrm BRANCH INT}
  833. So[1]:=0.60; So[2]:=0.60; So[3]:=0;
  834. So[4]:=0; So[5]:=0; So[6]:=0;
  835.  
  836. if Ih='!'then begin
  837. S[1]:=0.60; S[2]:=0.60; S[3]:=0;
  838. S[4]:=0; S[5]:=0; S[6]:=0 end;
  839.  
  840. if Ih='_'then begin
  841. S[1]:=0.60; S[2]:=0.60; S[3]:=0.40;
  842. S[4]:=0.20; S[5]:=0.10; S[6]:=0.05 end;
  843.  
  844. Sa[1]:=1; Sa[2]:=0.95; Sa[3]:=0.80;
  845. Sa[4]:=0.59; Sa[5]:=0.30; Sa[6]:=0.15;
  846.  
  847.  
  848. {STEP value N/Na/No/Nh/Nha - Hrm BR INT}
  849. for i:=1to b do Hp[i]:=0;
  850. for i:=1to b do for j:=1to b do
  851. begin N[i,j]:=0;Na[i,j]:=0;
  852. Nh[i,j]:=0;Nha[i,j]:=0 end;
  853.  
  854. for i:=1to b do case(i)of
  855. 7:Hp[i]:=Mi;8:Hp[i]:=h1;9:Hp[i]:=h2;
  856. else Hp[i]:=i end;
  857.  
  858. for i:=1to b do for j:=1to b do
  859. if(i>j)or(i<j)then begin
  860. x:=Hp[i];y:=Hp[j];
  861. if(Hp[i]>Hp[j])then N[i,j]:=S[(x-y)+1]
  862. else N[i,j]:=S[(y-x)+1];
  863. if(Hp[i]>Hp[j])then Na[i,j]:=Sa[(x-y)+1]
  864. else Na[i,j]:=Sa[(y-x)+1];
  865.  
  866. if(Hp[i]>Hp[j])then No[i,j]:=So[(x-y)+1]
  867. else No[i,j]:=So[(y-x)+1];
  868.  
  869. if(Hp[i]>Hp[j])then Nh[i,j]:=S[(x-y)+1]/2
  870. else Nh[i,j]:=S[(y-x)+1]/2;
  871. if(Hp[i]>Hp[j])then
  872. Nha[i,j]:=Sa[(x-y)+1]/2 else
  873. Nha[i,j]:=Sa[(y-x)+1]/2 end;
  874.  
  875. { Na : Mov Ln / Day Clash Ln}
  876. for i:=1to b do for j:=1to b do
  877. if(i>j)or(i<j)then begin
  878. if Ba[i]=1then begin N[i,i]:=0.01;
  879. N[i,j]:=Na[i,j];N[j,i]:=Na[j,i];
  880. No[i,j]:=Na[i,j];No[j,i]:=Na[j,i]end;
  881. { Nha '_' Hid Act Ln - NOT/OUT}
  882. if Ih='_'then begin
  883. if(i=8)and(Ba[i]=1)and(h1o<1)then begin
  884. N[i,j]:=Nha[i,j];N[j,i]:=Nha[j,i]end;
  885. if(i=9)and(Ba[i]=1)and(h2o<1)then begin
  886. N[i,j]:=Nha[i,j];N[j,i]:=Nha[j,i]end;
  887. { Nh '_' Hid Quiet Ln - NOT/OUT}
  888. if(i=8)and(Ba[i]=0)and(h1o<1)then begin
  889. N[i,j]:=Nh[i,j];N[j,i]:=Nh[j,i]end;
  890. if(i=9)and(Ba[i]=0)and(h2o<1)then begin
  891. N[i,j]:=Nh[i,j];N[j,i]:=Nh[j,i]end end;
  892. { N=0 '!' - Hidden Ln NOT/OUT}
  893. if Ih='!'then begin
  894. if(i=8)and(h1o<1)then begin
  895. N[i,j]:=0;N[j,i]:=0 end;
  896. if(i=9)and(h2o<1)then begin
  897. N[i,j]:=0;N[j,i]:=0 end end end;
  898.  
  899.  
  900. {Bso}for i:=1to b do Bso[i]:=Bs[i];
  901.  
  902.  
  903. {EARTH Branch CLASH : Sc,Oc u,v}
  904. Sc:=' ';Oc:=' ';u:=0;v:=0;
  905. for j:=1to b do for i:=1to b do
  906. if(i>j)or(i<j)then
  907. if((Hb[i]='b')and(Hb[j]='h')or
  908. (Hb[i]='e')and(Hb[j]='k')or
  909. (Hb[i]='h')and(Hb[j]='b')or
  910. (Hb[i]='k')and(Hb[j]='e'))and
  911. ((N[i,j]>0)or(N[j,i]>0))then begin
  912. Sc:=Hb[i];Oc:=Hb[j];u:=i;v:=j;
  913. if(i=Si)then Sc:='^';
  914. if(i=Oi)then Sc:=':';
  915. if(j=Si)then Oc:='^';
  916. if(j=Oi)then Oc:=':'end;
  917.  
  918. u0:=u;v0:=v;
  919.  
  920. {Brch COMBINE - SAc/OAc : S/O Act Comb}
  921. x:=0;y:=0;SAc:=' ';OAc:=' ';uv:='_';
  922. for i:=1to b do for j:=1to b do
  923. if(Hb[i]='a')and(Hb[j]='b')or
  924. (Hb[i]='c')and(Hb[j]='l')or
  925. (Hb[i]='d')and(Hb[j]='k')or
  926. (Hb[i]='e')and(Hb[j]='j')or
  927. (Hb[i]='f')and(Hb[j]='i')or
  928. (Hb[i]='g')and(Hb[j]='h')then begin
  929. if u>0then begin uv:='*';
  930. if(((i=u)or(i=v))and(Ba[j]=1))
  931. or(((j=u)or(j=v))and(Ba[i]=1))then
  932. begin u:=0;v:=0;uv:='~'end end;
  933. if i=Si then x:=j;if j=Si then x:=i;
  934. if i=Oi then y:=j;if j=Oi then y:=i;
  935. if(No[i,j]>0)or(No[j,i]>0)then begin
  936. if(i=Si)or(j=Si)then SAc:='^';
  937. if(i=Oi)or(j=Oi)then OAc:=':'end end;
  938.  
  939. {c1,c2,c3:S/O - Cb:x/y Date bind}
  940. c1:=' ';if x=Oi then c1:=' ';
  941. if Bb[Si]='~'then c1:='~';
  942. if(x>0)and((x>Oi)or(x<Oi))and(SAc='^')
  943. then c1:='!';
  944. if((x>0)and((x>Oi)or(x<Oi))and(SAc='^'))
  945. and (Bb[Si]='~')then c1:='#';
  946.  
  947. c3:=' ';if x=Oi then c3:=' ';
  948. if Bb[Oi]='~'then c3:='~';
  949. if(y>0)and((x>Oi)or(x<Oi))and(OAc=':')
  950. then c3:='!';
  951. if((y>0)and((x>Oi)or(x<Oi))and(OAc=':'))
  952. and(Bb[Oi]='~')then c3:='#';
  953.  
  954. {s1-s4: S/O/x/y Act Int Ind}
  955. s1:='_';s2:=' ';s3:='_';s4:='_';
  956. for i:=1to b do for j:=1to b do
  957. if(i>j)or(i<j)then begin
  958. if No[x,Oi]>0 then s1:=':';
  959. if No[Si,Oi]>0then s2:=':';
  960. if No[Si,y]>0 then s3:=':';
  961. if No[x,y]>0 then s4:=':'end;
  962.  
  963. if x>0then begin
  964. if((BMc[x]='*')or(BMc[Oi]='*'))
  965. and(s1='_')then s1:='*'end;
  966. if((BMc[Si]='*')or(BMc[Oi]='*'))
  967. and(s2=' ')then s2:='*';
  968. if y>0then begin
  969. if((BMc[Si]='*')or(BMc[y]='*'))
  970. and(s3='_')then s3:='*'end;
  971. if(x>0)and(y>0)then begin
  972. if((BMc[x]='*')or(BMc[y]='*'))
  973. and(s4='_')then s4:='*'end;
  974.  
  975. {u1/u2/u3/u4 : S/O/x/y Ml clash Ind}
  976. u1:=' ';u2:=' ';u3:=' ';u4:=' ';
  977. if BMc[x]='*' then u1:='*';
  978. if BMc[Si]='*'then u2:='*';
  979. if BMc[Oi]='*'then u3:='*';
  980. if BMc[y]='*' then u4:='*';
  981.  
  982. {Bei}
  983. for i:=0to 9do Bei[i]:=' ';
  984. for i:=1to b do begin
  985. if BMc[i]='*'then Bei[i]:='*';
  986. if DCe[i]='-'then Bei[i]:='-';
  987. if BDc[i]='|'then Bei[i]:='|';
  988. if BDc[i]='/'then Bei[i]:='/'end;
  989.  
  990. {Gen/Con G/C}
  991. for i:=1to b do begin G[i]:=0;C[i]:=0;
  992. G0[i]:=1;C0[i]:=1 end;
  993.  
  994. for i:=1to b do for j:=1to b do
  995. if(i>j)or(i<j)then begin
  996. if Be[i]='W'then case(Be[j])of
  997. 'F':G[i]:=G[i]+N[i,j];
  998. 'E':C[i]:=C[i]+N[i,j]end;
  999. if Be[i]='F'then case(Be[j])of
  1000. 'E':G[i]:=G[i]+N[i,j];
  1001. 'M':C[i]:=C[i]+N[i,j]end;
  1002. if Be[i]='E'then case(Be[j])of
  1003. 'M':G[i]:=G[i]+N[i,j];
  1004. 'w':C[i]:=C[i]+N[i,j]end;
  1005. if Be[i]='M'then case(Be[j])of
  1006. 'w':G[i]:=G[i]+N[i,j];
  1007. 'W':C[i]:=C[i]+N[i,j]end;
  1008. if Be[i]='w'then case(Be[j])of
  1009. 'W':G[i]:=G[i]+N[i,j];
  1010. 'F':C[i]:=C[i]+N[i,j]end end;
  1011.  
  1012. for i:=1to b do begin
  1013. Ng[i]:=0;Nc[i]:=0 end;
  1014.  
  1015. for i:=1to b do for j:=1to b do
  1016. if(i>j)or(i<j)then begin
  1017. if Be[i]='W'then case(Be[j])of
  1018. 'F':Ng[i]:=Ng[i]+1;
  1019. 'E':Nc[i]:=Nc[i]+1 end;
  1020. if Be[i]='F'then case(Be[j])of
  1021. 'E':Ng[i]:=Ng[i]+1;
  1022. 'M':Nc[i]:=Nc[i]+1 end;
  1023. if Be[i]='E'then case(Be[j])of
  1024. 'M':Ng[i]:=Ng[i]+1;
  1025. 'w':Nc[i]:=Nc[i]+1 end;
  1026. if Be[i]='M'then case(Be[j])of
  1027. 'w':Ng[i]:=Ng[i]+1;
  1028. 'W':Nc[i]:=Nc[i]+1 end;
  1029. if Be[i]='w'then case(Be[j])of
  1030. 'W':Ng[i]:=Ng[i]+1;
  1031. 'F':Nc[i]:=Nc[i]+1 end end;
  1032.  
  1033. for i:=1 to b do if Ng[i]>0 then
  1034. G[i]:=G[i]/Ng[i] else G[i]:=Ng[i];
  1035. for i:=1 to b do if Nc[i]>0 then
  1036. C[i]:=C[i]/Nc[i] else C[i]:=Nc[i];
  1037.  
  1038.  
  1039. if(Md='S')or(Md='M')then begin
  1040. if uv='~'then for i:=1to b do
  1041. if(i=u0)or(i=v0)then begin
  1042. G[i]:=G[i]/2;C[i]:=C[i]/2;
  1043. G0[i]:=0.5;C0[i]:=0.5 end;
  1044. if uv='*'then for i:=1to b do
  1045. if(i=u)or(i=v)then begin G[i]:=0;
  1046. C[i]:=0;G0[i]:=0;C0[i]:=0 end end;
  1047.  
  1048. if(Md='R')or(Md='L')then begin
  1049. if uv='*'then for i:=1to b do
  1050. if(i=u)or(i=v)then begin
  1051. G[i]:=G[i]/2;C[i]:=C[i]/2;
  1052. G0[i]:=0.5;C0[i]:=0.5 end end;
  1053.  
  1054.  
  1055. zF:=0; {Pi CYCLE}
  1056. zP:=0; G4: if kP>0then
  1057. for i:=1to b do Bs[i]:=RBd[i];
  1058. if Co='s'then if kP=0
  1059. then Oo:='o'else Oo:='n';
  1060. if Co='a'then Oo:='o';
  1061. if Co='C'then if(kP=0)or(kP=Pi-1)or(zP=1)
  1062. then Oo:='o'else Oo:='n';
  1063. if Co='O'then if(kP=0)or(kP=Pi-1)
  1064. then Oo:='o'else Oo:='n';
  1065. if Co='o'then if kP=Pi-1
  1066. then Oo:='o'else Oo:='n';
  1067. if Pi<3then Oo:='o';
  1068. if Co='n'then Oo:='n';
  1069.  
  1070.  
  1071. {ABs} G6: if zF=1then
  1072. for i:=1to b do Bs[i]:=ABs[i];
  1073.  
  1074.  
  1075. {Bg Bc Bd}
  1076. for i:=1to b do begin
  1077. Bg[i]:=0;Bc[i]:=0 end;
  1078.  
  1079. for i:=1to b do for j:=1to b do
  1080. if(i>j)or(i<j)then begin
  1081. if Be[i]='W'then case(Be[j])of
  1082. 'w':Bg[i]:=Bg[i]+(Bs[j]*N[i,j]*G0[j]);
  1083. 'M':Bc[i]:=Bc[i]+(Bs[j]*N[i,j]*C0[j])end;
  1084. if Be[i]='F'then case(Be[j])of
  1085. 'W':Bg[i]:=Bg[i]+(Bs[j]*N[i,j]*G0[j]);
  1086. 'w':Bc[i]:=Bc[i]+(Bs[j]*N[i,j]*C0[j])end;
  1087. if Be[i]='E'then case(Be[j])of
  1088. 'F':Bg[i]:=Bg[i]+(Bs[j]*N[i,j]*G0[j]);
  1089. 'W':Bc[i]:=Bc[i]+(Bs[j]*N[i,j]*C0[j])end;
  1090. if Be[i]='M'then case(Be[j])of
  1091. 'E':Bg[i]:=Bg[i]+(Bs[j]*N[i,j]*G0[j]);
  1092. 'F':Bc[i]:=Bc[i]+(Bs[j]*N[i,j]*C0[j])end;
  1093. if Be[i]='w'then case (Be[j])of
  1094. 'M':Bg[i]:=Bg[i]+(Bs[j]*N[i,j]*G0[j]);
  1095. 'E':Bc[i]:=Bc[i]+(Bs[j]*N[i,j]*C0[j])end
  1096. end;
  1097.  
  1098. {To STOP Int for ! Hid NOT/OUT}
  1099. for i:=1to b do e[i]:=1;
  1100. if Ih='!'then begin if h1o=0then e[8]:=0;
  1101. if h2o=0then e[9]:=0 end;
  1102.  
  1103. {Es Eg Ec}for i:=1to b do Es[i]:=0;
  1104. for i:=1to b do begin case(Be[i])of
  1105. 'W':Es[Wd]:=Es[Wd]+(Bs[i]*e[i]);
  1106. 'F':Es[Fr]:=Es[Fr]+(Bs[i]*e[i]);
  1107. 'E':Es[Er]:=Es[Er]+(Bs[i]*e[i]);
  1108. 'M':Es[Me]:=Es[Me]+(Bs[i]*e[i]);
  1109. 'w':Es[wt]:=Es[wt]+(Bs[i]*e[i])end end;
  1110.  
  1111. for i:=1to b do begin
  1112. Eg[i]:=0;Ec[i]:=0 end;
  1113. for i:=1to b do begin case(Be[i])of
  1114. 'W':Eg[Wd]:=Eg[Wd]+(Bs[i]*G[i]*e[i]);
  1115. 'F':Eg[Fr]:=Eg[Fr]+(Bs[i]*G[i]*e[i]);
  1116. 'E':Eg[Er]:=Eg[Er]+(Bs[i]*G[i]*e[i]);
  1117. 'M':Eg[Me]:=Eg[Me]+(Bs[i]*G[i]*e[i]);
  1118. 'w':Eg[wt]:=Eg[wt]+(Bs[i]*G[i]*e[i])end
  1119. end;
  1120. for i:=1to b do begin case(Be[i])of
  1121. 'W':Ec[Wd]:=Ec[Wd]+(Bs[i]*C[i]*e[i]);
  1122. 'F':Ec[Fr]:=Ec[Fr]+(Bs[i]*C[i]*e[i]);
  1123. 'E':Ec[Er]:=Ec[Er]+(Bs[i]*C[i]*e[i]);
  1124. 'M':Ec[Me]:=Ec[Me]+(Bs[i]*C[i]*e[i]);
  1125. 'w':Ec[wt]:=Ec[wt]+(Bs[i]*C[i]*e[i])end
  1126. end;
  1127. for i:=1to b do En[i]:=0;
  1128. for i:=1to b do begin case(Be[i])of
  1129. 'W':En[Wd]:=En[Wd]+(C[i]*e[i]);
  1130. 'F':En[Fr]:=En[Fr]+(C[i]*e[i]);
  1131. 'E':En[Er]:=En[Er]+(C[i]*e[i]);
  1132. 'M':En[Me]:=En[Me]+(C[i]*e[i]);
  1133. 'w':En[wt]:=En[wt]+(C[i]*e[i])end end;
  1134.  
  1135. {En0/Es0}if kP=0then begin
  1136. En0[1]:=0;Es0[0]:=0;
  1137. En0[1]:=En[Wd];En0[2]:=En[Fr];
  1138. En0[3]:=En[Er];En0[4]:=En[Me];
  1139. En0[5]:=En[wt];
  1140. Es0[1]:=Es[Wd];Es0[2]:=Es[Fr];
  1141. Es0[3]:=Es[Er];Es0[4]:=Es[Me];
  1142. Es0[5]:=Es[wt]end;
  1143. {He: Es0}for i:=1to 5do e[i]:=Es0[i];
  1144. e[0]:=e[1];m1:=1;for i:=2to 5do
  1145. if e[i]>e[0]then begin e[0]:=e[i];
  1146. m1:=i end;He:=Be[b+8+m1];
  1147.  
  1148.  
  1149. {Elm gen/con - Ig/Ic}
  1150. for i:=1to 20do begin
  1151. Ig[i]:=0;Ic[i]:=0 end;
  1152.  
  1153. Ig[1]:=Eg[5];Ig[3]:=Eg[2];Ig[5]:=Eg[4];
  1154. Ig[2]:=Eg[1];Ig[4]:=Eg[3];
  1155.  
  1156. Ic[1]:=Ec[4];Ic[3]:=Ec[1];Ic[5]:=Ec[3];
  1157. Ic[2]:=Ec[5];Ic[4]:=Ec[2];
  1158.  
  1159. {IgC/IcC % Es is gen/conq}
  1160. for i:=1to 5do IgC[i]:=0;
  1161. if Es[5]>0then IgC[1]:=Ig[1]/Es[5];
  1162. if Es[1]>0then IgC[2]:=Ig[2]/Es[1];
  1163. if Es[2]>0then IgC[3]:=Ig[3]/Es[2];
  1164. if Es[3]>0then IgC[4]:=Ig[4]/Es[3];
  1165. if Es[4]>0then IgC[5]:=Ig[5]/Es[4];
  1166.  
  1167. for i:=1to 5do IcC[i]:=0;
  1168. if Es[4]>0then IcC[1]:=Ic[1]/Es[4];
  1169. if Es[5]>0then IcC[2]:=Ic[2]/Es[5];
  1170. if Es[1]>0then IcC[3]:=Ic[3]/Es[1];
  1171. if Es[2]>0then IcC[4]:=Ic[4]/Es[2];
  1172. if Es[3]>0then IcC[5]:=Ic[5]/Es[3];
  1173.  
  1174. {RESULTANT VALUES CALCULATION}
  1175. for i:=1to 5do Es[i+5]:=Es[i];
  1176. for i:=1to 5do Ig[i+5]:=Ig[i];
  1177. for i:=1to 5do Ic[i+5]:=Ic[i];
  1178.  
  1179. Es[0]:=Es[1];m1:=1;for i:=2to 5do
  1180. if Es[i]>Es[0]then begin
  1181. Es[0]:=Es[i];m1:=i end;
  1182.  
  1183. {Es pos no}
  1184. if m1=1then begin
  1185. xS:=1;xP:=2;yW:=3;yP:=4;xG:=5 end;
  1186. if m1=2then begin
  1187. xS:=2;xP:=3;yW:=4;yP:=5;xG:=1 end;
  1188. if m1=3then begin
  1189. xS:=3;xP:=4;yW:=5;yP:=1;xG:=2 end;
  1190. if m1=4then begin
  1191. xS:=4;xP:=5;yW:=1;yP:=2;xG:=3 end;
  1192. if m1=5then begin
  1193. xS:=5;xP:=1;yW:=2;yP:=3;xG:=4 end;
  1194.  
  1195. Es[yW+5]:=Es[yW]-Ic[yW];if Es[yW+5]<0
  1196. then begin Ig[yP]:=0;Ic[xG]:=0 end;
  1197. if Es[yW+5]>0then begin
  1198. Ig[yP]:=Es[yW+5]*IgC[yP];
  1199. Ic[xG]:=Es[yW+5]*IcC[xG]end;
  1200.  
  1201. Es[xG+5]:=Es[xG]-Ic[xG];if Es[xG+5]<0
  1202. then begin Ig[xS]:=0;Ic[xP]:=0 end;
  1203. if Es[xG+5]>0then begin
  1204. Ig[xS]:=Es[xG+5]*IgC[xS];
  1205. Ic[xP]:=Es[xG+5]*IcC[xP]end;
  1206.  
  1207. Es[xP+5]:=Es[xP]-Ic[xP];if Es[xP+5]<0
  1208. then begin Ig[yW]:=0;Ic[yP]:=0 end;
  1209. if Es[xP+5]>0then begin
  1210. Ig[yW]:=Es[xP+5]*IgC[yW];
  1211. Ic[yP]:=Es[xP+5]*IcC[yP]end;
  1212.  
  1213. Es[yP+5]:=Es[yP]-Ic[yP];if Es[yP+5]<0
  1214. then begin Ig[xG]:=0;Ic[xS]:=0 end;
  1215. if Es[yP+5]>0then begin
  1216. Ig[xG]:=Es[yP+5]*IgC[xG];
  1217. Ic[xS]:=Es[yP+5]*IcC[xS]end;
  1218.  
  1219. Es[xS+5]:=Es[xS]-Ic[xS];if Es[xS+5]<0
  1220. then begin Ig[xP]:=0;Ic[yW]:=0 end;
  1221. if Es[xS+5]>0then begin
  1222. Ig[xP]:=Es[xS+5]*IgC[xP];
  1223. Ic[yW]:=Es[xS+5]*IcC[yW]end;
  1224.  
  1225.  
  1226. {FINAL RESULTANT CAL}
  1227. for i:=1to 5do Fs[i]:=0;
  1228. for i:=1to 5do Fs[i]:=Ig[i];
  1229. for i:=1to 5do Es[i+5]:=Es[i+5]+Fs[i];
  1230.  
  1231. for i:=1to 5do
  1232. if(Es[i+5]<0)or(Ig[i]=0)then Fs[i]:=0;
  1233. for i:=1to 5do
  1234. if Es[i+5]>0then if Es[i+5]<Fs[i]
  1235. then Fs[i]:=Es[i+5];
  1236.  
  1237. Es[7]:= Es[7]+(Fs[1]*IgC[2]);
  1238. Es[8]:= Es[8]-(Fs[1]*IcC[3]);
  1239. Es[8]:= Es[8]+(Fs[2]*IgC[3]);
  1240. Es[9]:= Es[9]-(Fs[2]*IcC[4]);
  1241. Es[9]:= Es[9]+(Fs[3]*IgC[2]);
  1242. Es[10]:=Es[10]-(Fs[3]*IcC[3]);
  1243. Es[10]:=Es[10]+(Fs[4]*IgC[2]);
  1244. Es[6]:= Es[6]-(Fs[4]*IcC[3]);
  1245. Es[6]:= Es[6]+(Fs[5]*IgC[2]);
  1246. Es[7]:= Es[7]-(Fs[5]*IcC[3]);
  1247.  
  1248. if Es[6]<0then begin
  1249. Ig[2]:=0;Ic[3]:=0 end;
  1250. if Es[7]<0then begin
  1251. Ig[3]:=0;Ic[4]:=0 end;
  1252. if Es[8]<0then begin
  1253. Ig[4]:=0;Ic[5]:=0 end;
  1254. if Es[9]<0then begin
  1255. Ig[5]:=0;Ic[1]:=0 end;
  1256. if Es[10]<0then begin
  1257. Ig[1]:=0;Ic[2]:=0 end;
  1258.  
  1259. for i:=1to 5do
  1260. if(Es[i+5]<0)or(Ig[i]=0)then Fs[i]:=0;
  1261. for i:=1to 5do
  1262. if Es[i+5]>0then if Es[i+5]<Fs[i]
  1263. then Fs[i]:=Es[i+5];
  1264.  
  1265. if Es[6]>0then begin
  1266. Ig[2]:=Ig[2]+(Fs[1]*IgC[2]);
  1267. Ic[3]:=Ic[3]+(Fs[1]*IcC[3])end;
  1268. if Es[7]>0then begin
  1269. Ig[3]:=Ig[3]+(Fs[2]*IgC[3]);
  1270. Ic[4]:=Ic[4]+(Fs[2]*IcC[4])end;
  1271. if Es[8]>0then begin
  1272. Ig[4]:=Ig[4]+(Fs[3]*IgC[4]);
  1273. Ic[5]:=Ic[5]+(Fs[3]*IcC[5])end;
  1274. if Es[9]>0then begin
  1275. Ig[5]:=Ig[5]+(Fs[4]*IgC[5]);
  1276. Ic[1]:=Ic[1]+(Fs[4]*IcC[1])end;
  1277. if Es[10]>0then begin
  1278. Ig[1]:=Ig[1]+(Fs[5]*IgC[1]);
  1279. Ic[2]:=Ic[2]+(Fs[5]*IcC[2])end;
  1280.  
  1281. for i:=1to 5do
  1282. Es[i+5]:=(Es[i]+(Ig[i]))-Ic[i];
  1283.  
  1284.  
  1285. {RBc RBg RBd}
  1286. for i:=1to 9do begin RBd[i]:=0;
  1287. RBc[i]:=Bc[i];RBg[i]:=Bg[i]end;
  1288. for i:=1to b do begin
  1289. if Ic[Bp[i]+5]=0then RBc[i]:=0 else
  1290. RBc[i]:=(RBc[i]*Ic[Bp[i]])/Ic[Bp[i]+5];
  1291. if Ig[Bp[i]+5]=0then RBg[i]:=0 else
  1292. RBg[i]:=(RBg[i]*Ig[Bp[i]])/Ig[Bp[i]+5]
  1293. end;for i:=1to b do
  1294. RBd[i]:=(Bs[i]+(RBg[i]))-RBc[i];
  1295.  
  1296. if on='n'then begin
  1297. for i:=1to b do e[i]:=RBd[i];
  1298. e[0]:=e[1];m1:=1;for i:=2to b do if
  1299. e[i]>e[0]then begin e[0]:=e[i];m1:=i end;
  1300. e[0]:=e[1];m2:=1;for i:=2to b do if
  1301. e[i]<e[0]then begin e[0]:=e[i];m2:=i end;
  1302. 3:repeat for i:=1to b do e[i]:=e[i]/2;
  1303. until (e[m1]<=0.1)and(e[m2]>=-0.1);
  1304. for i:=1to b do RBd[i]:=e[i]*4 end;
  1305.  
  1306. if(on='z')then begin
  1307. RBd[0]:=RBd[1];m1:=1;for i:=2to b do
  1308. if RBd[i]<RBd[0]then begin
  1309. RBd[0]:=RBd[i];m1:=i end;
  1310. RBd[0]:=RBd[m1];if RBd[0]<0then begin
  1311. RBd[0]:=RBd[0]-(RBd[0]*2);
  1312. for i:=1to b do RBd[i]:=RBd[i]+RBd[0]end;
  1313. RBd[0]:=0;
  1314. for i:=1to b do RBd[0]:=RBd[0]+RBd[i];
  1315. for i:=1to b do
  1316. RBd[i]:=(((RBd[i]*100)/RBd[0]))/100 end;
  1317.  
  1318.  
  1319. {RBP}for i:=1to b do PN[i]:=' ';
  1320. for i:=1to b do begin if Bs[i]>0then
  1321. RBP[i]:=((RBd[i]*10)/(Bs[i]))-10;
  1322. if(RBd[i]-Bs[i])<0then begin PN[i]:='-';
  1323. RBP[i]:=((RBd[i]*10)/(Bs[i]))-10;
  1324. if RBP[i]<0then
  1325. RBP[i]:=RBP[i]-(RBP[i]*2)end;
  1326. if RBP[i]>99then RBP[i]:=99;
  1327. if Bs[i]=RBd[i]then RBP[i]:=0 end;
  1328.  
  1329.  
  1330. case(Hb[Si])of
  1331. 'a':Sf:='A';'b':Sf:='B';'c':Sf:='C';
  1332. 'd':Sf:='D';'e':Sf:='E';'f':Sf:='F';
  1333. 'g':Sf:='G';'h':Sf:='H';'i':Sf:='I';
  1334. 'j':Sf:='J';'k':Sf:='K';'l':Sf:='L'end;
  1335.  
  1336. {Ts}for i:=1to 5do Ts[i]:=0;
  1337. for i:=1to b do RBo[i]:=RBd[i];
  1338. for i:=1to b do
  1339. if RBo[i]<0then RBo[i]:=0;
  1340. for i:=1to b do case(Be[i])of
  1341. 'W':Ts[1]:=Ts[1]+RBo[i];
  1342. 'F':Ts[2]:=Ts[2]+RBo[i];
  1343. 'E':Ts[3]:=Ts[3]+RBo[i];
  1344. 'M':Ts[4]:=Ts[4]+RBo[i];
  1345. 'w':Ts[5]:=Ts[5]+RBo[i]end;
  1346. {TsA}for i:=1to 5do AEl[i]:=' ';
  1347. for i:=1to b do begin
  1348. a:=Bei[i];if(i=Mi)or(i=7)then a:='-';
  1349. if(Be[i]='W')and(Ba[i]=1)then AEl[1]:=a;
  1350. if(Be[i]='F')and(Ba[i]=1)then AEl[2]:=a;
  1351. if(Be[i]='E')and(Ba[i]=1)then AEl[3]:=a;
  1352. if(Be[i]='M')and(Ba[i]=1)then AEl[4]:=a;
  1353. if(Be[i]='w')and(Ba[i]=1)then AEl[5]:=a
  1354. end;
  1355. {Te: Ts}for i:=1to 5do e[i]:=Ts[i];
  1356. e[0]:=e[1];m1:=1;for i:=2to 5do
  1357. if e[i]>e[0]then begin
  1358. e[0]:=e[i];m1:=i end;Te:=Be[b+8+m1];
  1359.  
  1360.  
  1361. {RBs RBm}if zP=0 then
  1362. for i:=1to 9do RBs[i]:=0;
  1363. for i:=1to 9do RBs[i]:=RBs[i]+RBd[i];
  1364. if zP>0 then
  1365. for i:=1to 9do RBm[i]:=RBs[i]/(zP+1);
  1366. {TsS TsM}if zP=0then
  1367. for i:=1to 5do TsS[i]:=0;
  1368. for i:=1to b do if RBm[i]<0then
  1369. RBo[i]:=0 else RBo[i]:=RBm[i];
  1370. for i:=1to b do case(Be[i])of
  1371. 'W':TsS[1]:=TsS[1]+RBo[i];
  1372. 'F':TsS[2]:=TsS[2]+RBo[i];
  1373. 'E':TsS[3]:=TsS[3]+RBo[i];
  1374. 'M':TsS[4]:=TsS[4]+RBo[i];
  1375. 'w':TsS[5]:=TsS[5]+RBo[i]end;
  1376. if zP>0 then
  1377. for i:=1to 5do TsM[i]:=TsS[i]/(zP+1);
  1378. {Se: TsM}for i:=1to 5do e[i]:=TsM[i];
  1379. e[0]:=e[1];m1:=1;for i:=2to 5do
  1380. if e[i]>e[0]then begin e[0]:=e[i];
  1381. m1:=i end;Se:=Be[b+8+m1];
  1382.  
  1383. {RBa}if(zP=Pi-1)then begin case(ET)of
  1384. 'E':for i:=1to b do e[i]:=Bso[i];
  1385. 'T':for i:=1to b do e[i]:=RBd[i];
  1386. 'M':for i:=1to b do e[i]:=RBm[i]end;
  1387. for i:=1to b do eW[i]:=e[i];
  1388. for i:=1to b do for j:=1to b do
  1389. if(i>j)or(i<j)then
  1390. if(BR[i,j]='>')and(Ba[i]=1)then
  1391. if e[i]<0then e[i]:=e[j]*N[i,j]*G0[j]
  1392. else e[i]:=e[i]+e[j]*N[i,j]*G0[j];
  1393. for i:=1to b do for j:=1to b do
  1394. if(i>j)or(i<j)then
  1395. if(BR[i,j]='>')and(Ba[j]=1)then
  1396. if e[i]<0then e[i]:=e[j]*N[i,j]*G0[j]
  1397. else e[i]:=e[i]+e[j]*N[i,j]*G0[j];
  1398. for i:=1to b do RBa[i]:=e[i];
  1399. {RBr}for i:=1to b do
  1400. RBr[i]:=RBa[i]-eW[i];if Cl=':'then
  1401. for i:=1to b do RBa[i]:=RBr[i];
  1402. {TsA}for i:=1to 5do TsA[i]:=0;
  1403. for i:=1to b do if RBa[i]<0then
  1404. RBo[i]:=0 else RBo[i]:=RBa[i];
  1405. for i:=1to b do case(Be[i])of
  1406. 'W':TsA[1]:=TsA[1]+RBo[i];
  1407. 'F':TsA[2]:=TsA[2]+RBo[i];
  1408. 'E':TsA[3]:=TsA[3]+RBo[i];
  1409. 'M':TsA[4]:=TsA[4]+RBo[i];
  1410. 'w':TsA[5]:=TsA[5]+RBo[i]end;
  1411. {Ae: TsA}for i:=1to 5do e[i]:=TsA[i];
  1412. e[0]:=e[1];m1:=1;for i:=2to 5do
  1413. if e[i]>e[0]then begin e[0]:=e[i];
  1414. m1:=i end;Ae:=Be[b+8+m1]end;
  1415.  
  1416.  
  1417. {ABs}if zF=0then begin
  1418. for i:=1to b do ABs[i]:=ABs[i]+RBd[i];
  1419. if zP>2then if zP=Pi-1 then begin
  1420. for i:=1to b do ABs[i]:=ABs[i]/Pi;
  1421. zF:=1; goto G6 end end;
  1422.  
  1423.  
  1424. if(zF=1)or(zP=Pi-1)then begin
  1425.  
  1426. {EcR/WgP PREDICTION CALCULATION}
  1427. if ET='E'then for i:=1to 5do begin
  1428. e[i]:=Es0[i];eW[i]:=Es0[i];a:=He end;
  1429. if ET='T'then for i:=1to 5do begin
  1430. e[i]:=Ts[i];eW[i]:=Ts[i];a:=Te end;
  1431. if ET='M'then for i:=1to 5do begin
  1432. e[i]:=TsM[i];eW[i]:=TsM[i];a:=Se end;
  1433. if oa=':'then for i:=1to 5do begin
  1434. e[i]:=TsA[i];eW[i]:=TsA[i];a:=Ae end;
  1435. {ET - Es0/Ts/TsM pos no}
  1436. if a='W'then begin
  1437. xS:=1;xP:=2;yW:=3;yP:=4;xG:=5 end;
  1438. if a='F'then begin
  1439. xS:=2;xP:=3;yW:=4;yP:=5;xG:=1 end;
  1440. if a='E'then begin
  1441. xS:=3;xP:=4;yW:=5;yP:=1;xG:=2 end;
  1442. if a='M'then begin
  1443. xS:=4;xP:=5;yW:=1;yP:=2;xG:=3 end;
  1444. if a='w'then begin
  1445. xS:=5;xP:=1;yW:=2;yP:=3;xG:=4 end;
  1446. {EcT/EcR : ET conq/Res ET}
  1447. EcT[1]:=e[4]*En0[4];
  1448. EcT[2]:=e[5]*En0[5];
  1449. EcT[3]:=e[1]*En0[1];
  1450. EcT[4]:=e[2]*En0[2];
  1451. EcT[5]:=e[3]*En0[3];
  1452. for i:=1to 5do
  1453. if EcT[i]<=0then EcT[i]:=0;
  1454. for i:=1to 5 do EcR[i]:=e[i]-EcT[i];
  1455. for i:=1to 5 do ETx[i]:=e[i];
  1456. {FINAL CALCULATION - Int Adj}
  1457. if EcR[yW]<=0then EcT[xG]:=0;
  1458. if e[xG]<eW[xG]then ETx[xG]:=eW[xG];
  1459. if(ETx[yW]-EcT[yW])>0then
  1460. EcT[xP]:=(ETx[xG]-EcT[xG])*En0[xG];
  1461.  
  1462. if EcR[xP]<=0then EcT[yP]:=0;
  1463. if e[yP]<eW[yP]then ETx[yP]:=eW[yP];
  1464. if(ETx[xP]-EcT[xP])>0then
  1465. EcT[yP]:=(ETx[xP]-EcT[xP])*En0[xP];
  1466. if(ETx[yP]-EcT[yP])>0then
  1467. EcT[xS]:=(ETx[yP]-EcT[yP])*En0[yP];
  1468.  
  1469. for i:=1to 5do
  1470. if EcT[i]<=0then EcT[i]:=0;
  1471. for i:=1to 5do EcR[i]:=ETx[i]-EcT[i];
  1472.  
  1473. {Re: EcR}for i:=1to 5do e[i]:=EcR[i];
  1474. e[0]:=e[1];m1:=1;for i:=2to 5do
  1475. if e[i]>e[0]then begin e[0]:=e[i];
  1476. m1:=i end;Re:=Be[b+8+m1]{zF=1}end;
  1477.  
  1478. for i:=1to 5do EcR[i+5]:=EcR[i];
  1479. for i:=1to 10do e[i]:=EcR[i];
  1480. {Wg/WgP}if Gn='r'then
  1481. for i:=1to 5do Wg[i]:=EcR[i]else begin
  1482. if oa=':'then
  1483. for i:=1to 5do Wg[i]:=TsA[i]else
  1484. case(ET)of
  1485. 'E':for i:=1to 5do Wg[i]:=Es0[i];
  1486. 'T':for i:=1to 5do Wg[i]:=Ts[i];
  1487. 'M':for i:=1to 5do Wg[i]:=TsM[i]end end;
  1488. for i:=1to 5do Wg[i+5]:=Wg[i];
  1489.  
  1490. for i:=1to 10do e[i]:=Wg[i];
  1491. if Aa='_'then for i:=1to 10do
  1492. if Wg[i]<=0then e[i]:=0;
  1493.  
  1494. eW[1]:=e[5]-e[4];eW[4]:=e[3]-e[2];
  1495. eW[2]:=e[1]-e[5];eW[5]:=e[4]-e[3];
  1496. eW[3]:=e[2]-e[1];
  1497. e[1]:=(eW[2]-eW[4])+(eW[3]-eW[5]);
  1498. e[2]:=(eW[3]-eW[5])+(eW[4]-eW[1]);
  1499. e[3]:=(eW[4]-eW[1])+(eW[5]-eW[2]);
  1500. e[4]:=(eW[5]-eW[2])+(eW[1]-eW[3]);
  1501. e[5]:=(eW[1]-eW[3])+(eW[2]-eW[4]);
  1502. for i:=1to 5do TmR[i]:=e[i];
  1503. for i:=1to 5do e[i+5]:=e[i];
  1504. WgP:={e[Ep[Si]+4]+}e[Ep[Si]+1]
  1505. -e[Ep[Si]+3];
  1506. Pw:='_';
  1507. if WgP>0then Pw:='<';
  1508. if WgP<0then Pw:='>';
  1509.  
  1510.  
  1511. {Results HEADING}
  1512. if(Cs='r')and(z=0)and(kT=0)then begin
  1513. for i:=1 to Cw-1 do Write(Wn[i],' ');
  1514. if Wn[1]=0then Write('o ')else
  1515. Write(' - ');Write('(',An,')');
  1516. if Cj<0then Write(Cj);Writeln(' ')end;
  1517.  
  1518. {kT/kR/pT/B1/2}k:=Ns+z;kT:=k;kR:=Rn[z+1];
  1519. if(WgP>0)and(T[k]='1')then T[k]:='R';
  1520. if(WgP>0)and(T[k]='2')then T[k]:='b';
  1521. if(WgP<0)and(T[k]='2')then T[k]:='B';
  1522. if(WgP<0)and(T[k]='1')then T[k]:='r';
  1523. B1:=B0;B2:=B0;
  1524. if T[k]='R'then begin B1:='o';B2:=' 'end;
  1525. if T[k]='r'then begin B1:='x';B2:=' 'end;
  1526. if T[k]='B'then begin B2:='o';B1:=' 'end;
  1527. if T[k]='b'then begin B2:='x';B1:=' 'end;
  1528. if T[k]='x'then begin B2:='X';B1:='X'end;
  1529. if Cs='r'then begin
  1530. if Wn[1]>0then begin
  1531. if Wn[1]=kR then B1:='o';
  1532. if Wn[2]=kR then B1:='*';
  1533. if Wn[3]=kR then B1:='(';
  1534. if Wn[4]=kR then B1:='[';
  1535. if(B1=B0)then B1:=' 'end;
  1536. if(T[Rn[k]]>T0)or(T[Rn[k]]<T0)
  1537. then B2:=T[Rn[k]]else
  1538. if(B2=B0)and(Wn[1]>0)then B2:=' 'end;
  1539. k:=z+1;
  1540. if(T[kT]>T0)or(T[kT]<T0)then pT:=k;
  1541. if pT>Sk then pT:=Sk;
  1542.  
  1543. {Wo}if zP=0then if Wn[1]=kR then
  1544. begin Wo[1]:=Mo[kT];Wo[kT]:=Mo[1]end;
  1545.  
  1546.  
  1547. {TsA/Pm}if(Pm[3]='-')and(Rr='o')
  1548. and(zu<3)and(PmL='o')then begin
  1549. if zP=1 then begin Write(' ');
  1550. for i:=1to 5do begin
  1551. if i=Ep[Si]then Write('.',AEl[i],'.')else
  1552. Write(' ',AEl[i],' ')end;Writeln end;
  1553. k:=-1;
  1554. case(Pm[1])of'8':k:=3141;'9':k:=16180;
  1555. '1':k:=11;'2':k:=31;'3':k:=61;'4':k:=161;
  1556. '5':k:=314;'6':k:=618;'7':k:=1618 end;
  1557. for i:=1to 9do Pc[i]:=-1;
  1558. if Pm[5]>='1'then Pc[1]:=11;
  1559. if Pm[5]>='2'then Pc[2]:=31;
  1560. if Pm[5]>='3'then Pc[3]:=61;
  1561. if Pm[5]>='4'then Pc[4]:=161;
  1562. if Pm[5]>='5'then Pc[5]:=314;
  1563. if Pm[5]>='6'then Pc[6]:=618;
  1564. if Pm[5]>='7'then Pc[7]:=1618;
  1565. if Pm[5]>='8'then Pc[8]:=3141;
  1566. if Pm[5]>='9'then Pc[9]:=16180;
  1567. if(zP=Pc[1])or(zP=Pc[4])or(zP=Pc[7])
  1568. or(zP=Pc[2])or(zP=Pc[5])or(zP=Pc[8])
  1569. or(zP=Pc[3])or(zP=Pc[6])or(zP=Pc[9])
  1570. or((zP>0)and(zP<k))or(zP=Pi-1)then begin
  1571. if ET='E'then begin a:='o';
  1572. for i:=1to 5do e[i]:=Es0[i]*mc end;
  1573. if ET='T'then begin a:='s';
  1574. for i:=1to 5do e[i]:=Ts[i]*mc end;
  1575. if ET='M'then begin a:='m';
  1576. for i:=1to 5do e[i]:=TsM[i]*mc end;
  1577. case(a)of'o':Write(He,'-');
  1578. 's':Write(Te,':');'m':Write(Se,'.')end;
  1579. Write(' ');for i:=1to 5do begin
  1580. if(e[i]>0)and(e[i]<0.95)then
  1581. Write('<',(e[i]*10):0:0,' ')else begin
  1582. if e[i]>=0then Write(' ');
  1583. if(e[i]<9.5)and(e[i]>=0)
  1584. then Write(e[i]:0:0,' ');
  1585. if(e[i]>9.5)and(e[i]>=0)
  1586. then Write(e[i]:0:0);
  1587. if(e[i]>-9.5)and(e[i]<0)
  1588. then Write(e[i]:0:0,' ');
  1589. if(e[i]<-9.5)then Write(e[i]:0:0);
  1590. end end;Writeln(' ',zP,' ')end;
  1591. if(zP=0)and(z>0)then Writeln end;
  1592.  
  1593. {Rw/Xw}if zP=0then begin Rw:=0;
  1594. for i:=1to 99do if Wh[i]=Mo[kT]
  1595. then begin Rw:=i;Xw[kT]:=Rw end end;
  1596.  
  1597.  
  1598. if(zu>1)and(zP=0)and(zr=1)and(kT>1)then
  1599. Writeln;if(Rr='R')or(Rr='r')or(Oo='n')
  1600. then goto G5;
  1601. {OUTPUT 0}Pw:='_';
  1602. if WgP>0then Pw:='<';
  1603. if WgP<0then Pw:='>';
  1604. if Md<='S'then begin Write(Yr-2000);
  1605. if Mt>9then Write(Mt)else Write('0',Mt);
  1606. if Dy>9then Write(Dy)else Write('0',Dy);
  1607. Write(I4[zr],I5[zr],I6[zr],'___',Pw);
  1608. if Rw=0then Write('__')else if Rw>9then
  1609. Write(Rw)else Write(Rw,'_');Write('___');
  1610. if Mo[kT]>9then
  1611. Write(Mo[kT])else Write('_',Mo[kT]);
  1612.  
  1613. if Is='.'then begin Write('__');
  1614. for i:=1to b do e[i]:=RBr[i]*mc;
  1615. for i:=1to 5do begin if i=h1 then begin
  1616. if(e[8]>0)and(e[8]<0.95)then
  1617. Write('<',(e[8]*10):0:0,'_')else begin
  1618. if e[8]<0then begin
  1619. if e[8]<=-9.5then Write(e[8]:0:0);
  1620. if e[8]>-9.5then Write(e[8]:0:0,'_')end;
  1621. if e[8]>=0then begin
  1622. if e[8]<9.5then Write(' ',e[8]:0:0,'_');
  1623. if e[8]>=9.5then
  1624. Write(' ',e[8]:0:0)end end end;
  1625. if i=h2 then begin
  1626. if(e[9]>0)and(e[9]<0.95)then
  1627. Write('<',(e[9]*10):0:0,'_')else begin
  1628. if e[9]<0 then begin
  1629. if e[9]<=-9.5then Write(e[9]:0:0);
  1630. if e[9]>-9.5then Write(e[9]:0:0,'_')end;
  1631. if e[9]>=0then begin
  1632. if e[9]<9.5then Write(' ',e[9]:0:0,'_');
  1633. if e[9]>=9.5then
  1634. Write(' ',e[9]:0:0)end end end;
  1635. if Hel[i]=' 'then Write('___')end end;
  1636. if Is='^'then for i:=1to 17do Write('_');
  1637. Writeln('_',I8[zr],Po,Pe);
  1638.  
  1639. {1}for i:=5to 8do if Db[i]='o'
  1640. then Write(' ')else Write(Db[i],' ');
  1641.  
  1642. if Wn[1]>0then B2:=' 'else B2:='.';
  1643. Write(' ',B1,' ',(10*H)+L,' ',B2,' ');
  1644.  
  1645. if u0>0then begin
  1646. r:=(RBd[u0]-RBd[v0])*100;
  1647. if r>=99.5then r:=99;
  1648. if r<=-99.5then r:=-99;Write(Sc);
  1649. if r<0then begin
  1650. if r<=-9.5then Write(r:0:0);
  1651. if r>-9.5then Write(r:0:0,' ')end;
  1652. if r>=0then begin
  1653. if r<9.5then Write(' ',r:0:0,' ');
  1654. if r>=9.5then Write(' ',r:0:0)end;
  1655. Write(Oc)end;
  1656. if u0=0then Write('___',uv,'_');
  1657.  
  1658. if oa=':'then
  1659. for i:=1to b do e[i]:=RBa[i]*mc else
  1660. case(ET)of
  1661. 'E':for i:=1to b do e[i]:=Bso[i]*mc;
  1662. 'T':for i:=1to b do e[i]:=RBd[i]*mc;
  1663. 'M':for i:=1to b do e[i]:=RBm[i]*mc end;
  1664. for i:=1to b do if(e[i]>-0.000000000001)
  1665. and(e[i]<=0.000000000001)then e[i]:=0;
  1666. for i:=1to 5do begin if i=h1 then begin
  1667. if(e[8]>0)and(e[8]<0.95)then
  1668. Write('<',(e[8]*10):0:0,'_')else begin
  1669. if e[8]<0then begin
  1670. if e[8]<=-9.5then Write(e[8]:0:0);
  1671. if e[8]>-9.5then Write(e[8]:0:0,'_')end;
  1672. if e[8]>=0then begin
  1673. if e[8]<9.5then Write(' ',e[8]:0:0,'_');
  1674. if e[8]>=9.5then
  1675. Write(' ',e[8]:0:0)end end end;
  1676. if i=h2 then begin
  1677. if(e[9]>0)and(e[9]<0.95)then
  1678. Write('<',(e[9]*10):0:0,'_')else begin
  1679. if e[9]<0 then begin
  1680. if e[9]<=-9.5then Write(e[9]:0:0);
  1681. if e[9]>-9.5then Write(e[9]:0:0,'_')end;
  1682. if e[9]>=0then begin
  1683. if e[9]<9.5then Write(' ',e[9]:0:0,'_');
  1684. if e[9]>=9.5then
  1685. Write(' ',e[9]:0:0)end end end;
  1686. if Hel[i]=' ' then Write('___')end;
  1687.  
  1688. {2}Writeln('__',Vd);
  1689. for i:=1to 4do if Db[i]='o'then
  1690. Write(' ')else Write(Db[i],' ');
  1691. Write(' ');
  1692. if x=Oi then Write('___|___ ')else begin
  1693. if(x=0)and(y=0)then Write('_______ ')
  1694. else Write(s1,'__',s4,'__',s3,' ')end;
  1695. if uv='~'then Write(' ',uv,' ')
  1696. else Write(' ');
  1697.  
  1698. for i:=1to 5do begin
  1699. if i=h1 then Write(Hol[8],Hb[8],Bei[8]);
  1700. if i=h2 then Write(Hol[9],Hb[9],Bei[9]);
  1701. if Hel[i]=' 'then Write(' ')end;
  1702.  
  1703. {3}Writeln;if Cl=':'then Write(':')
  1704. else Write(' ');Write(I7[zr],' ');
  1705.  
  1706. if(x=Oi)or(x=0)then Write(' ')else
  1707. if x>0then Write(u1,Hb[x],' ');
  1708. Write(c1,Sf,u2,' ',BR[Si,Oi],' ',
  1709. u3,Hb[Oi],c3,' ');
  1710. if(x=Oi)or(y=0)then Write(' ')else
  1711. if y>0then Write(Hb[y],u4,' ');
  1712.  
  1713. for i:=1to 6do begin
  1714. if i=Si then Write('(',Sf,Bei[i])else
  1715. if i=Oi then Write('•',Hb[i],Bei[i])
  1716. else Write(' ',Hb[i],Bei[i])end;Writeln;
  1717.  
  1718. {4}if Cs='r'then k:=kR else k:=kT;
  1719. if k<=9then Write('(',k,') ');
  1720. if(k>9)and(k<=99)then Write(k,') ');
  1721. if k>99then Write(k,')');
  1722.  
  1723. if(x=Oi)or(x=0)then Write(' ')else
  1724. if x>0then begin Write(' ');
  1725. if e[x]<0then begin
  1726. if e[x]<=-9.5then Write(e[x]:0:0);
  1727. if e[x]>-9.5then Write(e[x]:0:0,' ')end;
  1728. if e[x]>=0then begin
  1729. if e[x]<9.5then Write(' ',e[x]:0:0,' ');
  1730. if e[x]>=9.5then Write(' ',e[x]:0:0)end
  1731. end;
  1732. if e[Si]<0then begin
  1733. if e[Si]<=-9.5then Write(e[Si]:0:0);
  1734. if e[Si]>-9.5then Write(e[Si]:0:0,' ')
  1735. end;
  1736. if e[Si]>=0then begin if e[Si]<9.5then
  1737. Write(' ',e[Si]:0:0,' ');
  1738. if e[Si]>=9.5then Write(' ',e[Si]:0:0)
  1739. end;Write(' ',s2,' ');
  1740. if e[Oi]<0then begin if e[Oi]<=-9.5
  1741. then Write(e[Oi]:0:0);if e[Oi]>-9.5
  1742. then Write(e[Oi]:0:0,' ')end;
  1743. if e[Oi]>=0then begin if e[Oi]<9.5then
  1744. Write(' ',e[Oi]:0:0,' ');if e[Oi]>=9.5
  1745. then Write(' ',e[Oi]:0:0)end;
  1746.  
  1747. if x=Oi then Write(' ')else
  1748. if y>0then begin if e[y]<0then begin
  1749. if e[y]<=-9.5then Write(e[y]:0:0);
  1750. if e[y]>-9.5then Write(e[y]:0:0,' ')end;
  1751. if e[y]>=0then begin
  1752. if e[y]<9.5then Write(' ',e[y]:0:0,' ');
  1753. if e[y]>=9.5then
  1754. Write(' ',e[y]:0:0)end end;
  1755.  
  1756. if y=0then Write(' ');Write(' ');
  1757.  
  1758. for i:=1to 5do if i=Mi then
  1759. Write(Hb[7],Bei[7],' ')else Write(' ');
  1760. if 6=Mi then Write(Hb[7],Bei[7])
  1761. else Write(' ');
  1762.  
  1763. {5}Writeln;
  1764. if Ih='_'then Write(' ')else Write(Ih);
  1765. Write(' ');
  1766. if Ie='*'then Write(' ')else Write(Ie);
  1767. if(x=Oi)or(x=0)then Write(' ')
  1768. else if x>0then begin Write(' ');
  1769. if(RBP[x]>=0)and(RBP[x]<9.5)
  1770. then Write(PN[x],RBP[x]:0:0,' ');
  1771. if(RBP[x]>=9.5)and(RBP[x]<=99.5)
  1772. then Write(PN[x],RBP[x]:0:0)end;
  1773.  
  1774. if(RBP[Si]>=0)and(RBP[Si]<9.5)
  1775. then Write(PN[Si],RBP[Si]:0:0,' ');
  1776. if(RBP[Si]>=9.5)and(RBP[Si]<=99.5)
  1777. then Write(PN[Si],RBP[Si]:0:0);
  1778. r:=(e[Si]-e[Oi])*10;
  1779. if r>=99.5then r:=99;
  1780. if r<=-99.5then r:=-99;
  1781. if r<0then begin
  1782. if r<=-9.5then Write(r:0:0);
  1783. if r>-9.5then Write(r:0:0,' ')end;
  1784. if r>=0then begin
  1785. if r<9.5then Write(' ',r:0:0,' ');
  1786. if r>=9.5 then Write(' ',r:0:0)end;
  1787. if(RBP[Oi]>=0)and(RBP[Oi]<9.5)
  1788. then Write(PN[Oi],RBP[Oi]:0:0,' ');
  1789. if(RBP[Oi]>=9.5)and(RBP[Oi]<=99.5)
  1790. then Write(PN[Oi],RBP[Oi]:0:0);
  1791.  
  1792. if x=Oi then Write(' ')else
  1793. if y>0 then begin
  1794. if(RBP[y]>=0)and(RBP[y]<9.5)
  1795. then Write(PN[y],RBP[y]:0:0,' ');
  1796. if(RBP[y]>=9.5)and(RBP[y]<=99.5)
  1797. then Write(PN[y],RBP[y]:0:0)end;
  1798.  
  1799. if y=0then Write(' ');Write(' ');
  1800.  
  1801. for i:=1to 6do begin
  1802. if(e[i]>0)and(e[i]<0.95)then
  1803. Write('<',(e[i]*10):0:0,' ')else begin
  1804. if e[i]<0then begin
  1805. if e[i]<=-9.5then Write(e[i]:0:0);
  1806. if e[i]>-9.5then Write(e[i]:0:0,' ')end;
  1807. if e[i]>=0then begin if e[i]<9.5
  1808. then Write(' ',e[i]:0:0,' ');if e[i]>=9.5
  1809. then Write(' ',e[i]:0:0)end end end;
  1810.  
  1811. {6}Writeln;if oa=':'then Write(Ae)
  1812. else case(ET)of'E':Write(He);
  1813. 'T':Write(Te);'M':Write(Se)end;
  1814. r:=WgP*mr;if(r>0)and(r<0.95)then
  1815. Write('<',(r*10):0:0,' ')else begin
  1816. if r>=0then Write('_');if(r<9.5)and(r>=0)
  1817. then Write(r:0:0,' ');
  1818. if(r>9.5)and(r>=0)then Write(r:0:0);
  1819. if(r>-9.5)and(r<0)then Write(r:0:0,' ');
  1820. if(r<-9.5)then Write(r:0:0)end;
  1821. Write(' ');if oa=':'then
  1822. for i:=1to 5do eE[i]:=TsA[i]*mc else
  1823. case(ET)of
  1824. 'E':for i:=1to 5do eE[i]:=Es0[i]*mc;
  1825. 'T':for i:=1to 5do eE[i]:=Ts[i]*mc;
  1826. 'M':for i:=1to 5do eE[i]:=TsM[i]*mc end;
  1827. for i:=1to 5do begin
  1828. if(eE[i]>0)and(eE[i]<0.95)then
  1829. Write('<',(eE[i]*10):0:0,' ')else begin
  1830. if eE[i]>=0then Write(' ');
  1831. if(eE[i]<9.5)and(eE[i]>=0)
  1832. then Write(eE[i]:0:0,' ');
  1833. if(eE[i]>9.5)and(eE[i]>=0)
  1834. then Write(eE[i]:0:0);
  1835. if(eE[i]>-9.5)and(eE[i]<0)
  1836. then Write(eE[i]:0:0,' ');
  1837. if(eE[i]<-9.5)then
  1838. Write(eE[i]:0:0)end end;
  1839. if(eE[i]>9.5)or(eE[i]>-9.5)then
  1840. Write('__')else Write(' _');
  1841.  
  1842. for i:=1to 6do begin
  1843. if i=Mi then begin
  1844. if(e[7]>0)and(e[7]<0.95)then
  1845. Write('<',(e[7]*10):0:0,' ')else begin
  1846. if e[7]<0then begin
  1847. if e[7]<=-9.5then Write(e[7]:0:0);
  1848. if e[7]>-9.5then Write(e[7]:0:0,'_')end;
  1849. if e[7]>=0then begin if e[7]<9.5
  1850. then Write(' ',e[7]:0:0,'_');if e[7]>=9.5
  1851. then Write(' ',e[7]:0:0)end end end;
  1852. if (i>Mi)or(i<Mi)then Write('___')end;
  1853. Writeln('_') {Md<='S'}end;
  1854.  
  1855.  
  1856. {7}if Md<='M'then begin {M Mode}
  1857. Write(' ');
  1858. for i:=1to b do e[i]:=Bs[i]*100;
  1859. if b>=8then if e[8]<9.5 then
  1860. Write(e[8]:0:0,' ')else Write(e[8]:0:0);
  1861. if b<8then Write(' ');Write(' ');
  1862. if e[7]<9.5then Write(e[7]:0:0,' ')
  1863. else Write(e[7]:0:0);Write(' ');
  1864. if b=9then if e[9]<9.5then
  1865. Write(e[9]:0:0,' ')else Write(e[9]:0:0);
  1866. if b<9then Write(' ');Write(' ');
  1867. for i:=1to 6do if e[i]<9.5
  1868. then Write(e[i]:0:0,' ')
  1869. else Write(e[i]:0:0,' ');Writeln;
  1870.  
  1871. {8}Write(' ');
  1872. for i:=1to b do e[i]:=RBg[i]*100;
  1873. if b<8then Write(' ')else
  1874. if e[8]<9.5then Write(e[8]:0:0,' ')
  1875. else Write(e[8]:0:0);Write(' ');
  1876. if e[7]<9.5then Write(e[7]:0:0,' ')
  1877. else Write(e[7]:0:0);Write(' ');
  1878. if b<9then Write(' ')else
  1879. if e[9]<9.5then Write(e[9]:0:0,' ')
  1880. else Write(e[9]:0:0);Write(' ');
  1881. for i:=1to 6do
  1882. if e[i]<9.5then Write(e[i]:0:0,' ')
  1883. else Write(e[i]:0:0,' ');Writeln;
  1884.  
  1885. {9}Write(' ');
  1886. for i:=1to b do e[i]:=RBc[i]*100;
  1887. if b<8then Write(' ')else
  1888. if e[8]<9.5then Write(e[8]:0:0,' ')
  1889. else Write(e[8]:0:0);Write(' ');
  1890. if e[7]<9.5then Write(e[7]:0:0,' ')
  1891. else Write(e[7]:0:0);Write(' ');
  1892. if b<9then Write(' ')else
  1893. if e[9]<9.5then Write(e[9]:0:0,' ')
  1894. else Write(e[9]:0:0);Write(' ');
  1895. for i:=1to 6do
  1896. if e[i]<9.5then Write(e[i]:0:0,' ')
  1897. else Write(e[i]:0:0,' ');
  1898.  
  1899. {10}Writeln;Write('_____');
  1900. for i:=1to b do
  1901. if PN[i]=' 'then PN[i]:='_';
  1902. if b>=8then begin if RBP[8]<9.5
  1903. then Write(PN[8],RBP[8]:0:0,'_')
  1904. else Write(PN[8],RBP[8]:0:0)end;
  1905. if b<8then Write('___');Write('___');
  1906. if RBP[7]<9.5
  1907. then Write(PN[7],RBP[7]:0:0,'____')
  1908. else Write(PN[7],RBP[7]:0:0,'___');
  1909. if b=9then begin if RBP[9]<9.5
  1910. then Write(PN[9],RBP[9]:0:0,'_')
  1911. else Write(PN[9],RBP[9]:0:0)end;
  1912. if b<9then Write('___');Write('__');
  1913. for i:=1to 6do begin if RBP[i]<9.5
  1914. then Write(PN[i],RBP[i]:0:0,'_')
  1915. else Write(PN[i],RBP[i]:0:0)end;
  1916. Writeln('_') {M Mode} end; G3:
  1917.  
  1918. if(zP=1)and(Pi>2)then goto G5;
  1919.  
  1920. z0:=z0+1; G5: zP:=zP+1;
  1921. kP:=zP;while kP>=Pi do kP:=kP-Pi;
  1922.  
  1923. if kP>0then goto G4;
  1924.  
  1925.  
  1926. if(Rr='o')and(zr<7)and(Oo='o')then begin
  1927. if(Yy='_')then begin if Gn='r'then
  1928. Write(Re,'_ ')else Write(Re,' ');
  1929.  
  1930. for i:=1to 5do e[i]:=EcR[i]*mc;
  1931. Write(' ');for i:=1to 5do begin
  1932. if(e[i]>0)and(e[i]<0.95)then
  1933. Write('<',(e[i]*10):0:0,' ')else begin
  1934. if e[i]>=0then Write(' ');
  1935. if(e[i]<9.5)and(e[i]>=0)
  1936. then Write(e[i]:0:0,' ');
  1937. if(e[i]>9.5)and(e[i]>=0)
  1938. then Write(e[i]:0:0);
  1939. if(e[i]>-9.5)and(e[i]<0)
  1940. then Write(e[i]:0:0,' ');if(e[i]<-9.5)
  1941. then Write(e[i]:0:0)end end;
  1942.  
  1943. if(Zz='-')or(Zz='.')then begin
  1944.  
  1945. if Is='.'then begin Write(' ');
  1946. for i:=1to b do e[i]:=RBr[i]*mc;
  1947. for i:=1to 6do begin
  1948. if(e[i]>0)and(e[i]<0.95)then
  1949. Write('<',(e[i]*10):0:0,' ')else begin
  1950. if e[i]<0then begin
  1951. if e[i]<=-9.5then Write(e[i]:0:0);
  1952. if e[i]>-9.5then Write(e[i]:0:0,' ')end;
  1953. if e[i]>=0then begin if e[i]<9.5
  1954. then Write(' ',e[i]:0:0,' ');if e[i]>=9.5
  1955. then Write(' ',e[i]:0:0)end end end;
  1956. Writeln;Write(' ')end;case(Zz)of
  1957. '-':for i:=1to 5do e[i]:=Es0[i]*mc;
  1958. '.':for i:=1to 5do e[i]:=TmR[i]*mr end;
  1959. Write(' ');for i:=1to 5do begin
  1960. if(e[i]>0)and(e[i]<0.95)then
  1961. Write('<',(e[i]*10):0:0,' ')else begin
  1962. if e[i]>=0then Write(' ');
  1963. if(e[i]<9.5)and(e[i]>=0)
  1964. then Write(e[i]:0:0,' ');
  1965. if(e[i]>9.5)and(e[i]>=0)
  1966. then Write(e[i]:0:0);
  1967. if(e[i]>-9.5)and(e[i]<0)
  1968. then Write(e[i]:0:0,' ');
  1969. if(e[i]<-9.5)then
  1970. Write(e[i]:0:0)end end;
  1971. if(e[i]>9.5)or(e[i]>-9.5)then
  1972. Write(' ')else Write(' ')end;
  1973.  
  1974. if Is='.'then begin
  1975. for i:=1to 6do begin
  1976. if i=Mi then begin
  1977. if(e[7]>0)and(e[7]<0.95)then
  1978. Write('<',(e[7]*10):0:0)else begin
  1979. if e[7]<0then begin
  1980. if e[7]<=-9.5then Write(e[7]:0:0);
  1981. if e[7]>-9.5then Write(e[7]:0:0)end;
  1982. if e[7]>=0then begin if e[7]<9.5
  1983. then Write(' ',e[7]:0:0);if e[7]>=9.5
  1984. then Write(e[7]:0:0)end end end;
  1985. if (i>Mi)or(i<Mi)then Write(' ')end;
  1986. end;Writeln;
  1987.  
  1988. if ci='i'then begin
  1989. for i:=1to b do Mli[i]:=' ';
  1990. for i:=1to b do
  1991. if(Bei[i]='|')then Mli[Ep[i]]:='|';
  1992. for i:=1to b do if(i=Mi)or(i=7)then
  1993. Mli[Ep[i]]:='*';for i:=1to b do
  1994. if(Bei[i]='/')then Mli[Ep[i]]:='/';
  1995. Write(' ');for i:=1to 5do
  1996. Write(Mli[i],' ');Writeln end end end;
  1997.  
  1998.  
  1999. Ap[zr,kT]:=WgP;
  2000. Ap[0,kT]:=Ap[0,kT]+Ap[zr,kT];
  2001. Ar[zr,kT]:=Ap[0,kT];
  2002. {P-1}
  2003. if WgP>0then Rp[zr,kT]:=1;
  2004. if WgP=0then Rp[zr,kT]:=0;
  2005. if(WgP<0)and(WgP>-99)then Rp[zr,kT]:=-1;
  2006. Rp[0,kT]:=Rp[0,kT]+Rp[zr,kT];
  2007. if((WgP>0)and(aT[kT]='1'))
  2008. or((WgP<0)and(aT[kT]='2'))
  2009. then jW[zr]:=jW[zr]+1;
  2010. Wp[kT,zr]:=Wp[kT,zr]+jW[zr];
  2011. if(Rp[zr,kT]=0)then jU[zr]:=jU[zr]+1;
  2012. Up[kT,zr]:=Up[kT,zr]+jU[zr];
  2013. if((WgP>0)and(aT[kT]='2'))
  2014. or((WgP<0)and(aT[kT]='1'))
  2015. then Lp[zr]:=Lp[zr]+1;
  2016. {Output}if(Rr='R')or(Rr='r')then begin
  2017. if Rr='r'then begin
  2018. if zr>9then Write(zr)else Write(' ',zr);
  2019. Write(') ',Ih,Cl,Ie,' ');
  2020. if Pw='<'then Write(Pw)else Write(' ');
  2021. Write(T[kT]);
  2022. if Pw='>'then Write(Pw)else Write(' ');
  2023. Write(' ');Writeln(kT,'_',kT-Up[kT,zr],
  2024. '/',Wp[kT,zr],' ',
  2025. Wp[kT,zr]-((kT-Up[kT,zr])-Wp[kT,zr]),
  2026. ' ',Rp[0,kT]:0:0,' ',I5[zr],I6[zr]);
  2027. if zr=zu then Writeln end end;
  2028.  
  2029. until zr=zu;
  2030. z:=z+1;until (o=0)or(kT=Sk)or(z=Ct); G1:
  2031.  
  2032.  
  2033. {P-2}
  2034. if Ed=':'then for i:=1to Ct do begin
  2035. if Rp[0,i]<0 then Rp[0,i]:=-2;
  2036. if Rp[0,i]>0 then Rp[0,i]:=1 end;
  2037. if Ed='.'then for i:=1to Ct do begin
  2038. r:=1;if zu>9then r:=9/zu;
  2039. Rp[0,i]:=Rp[0,i]/(1/r) end;
  2040.  
  2041. j:=0;k:=0;for i:=1to Ct do begin
  2042. if Rp[0,i]=0then j:=j+1;F0[i]:=j;
  2043. if(Rp[0,i]>0)and(aT[i]='1')
  2044. then T[i]:='R';
  2045. if(Rp[0,i]>0)and(aT[i]='2')
  2046. then T[i]:='b';
  2047. if(Rp[0,i]<0)and(aT[i]='2')
  2048. then T[i]:='B';
  2049. if(Rp[0,i]<0)and(aT[i]='1')
  2050. then T[i]:='r';
  2051. if(Rp[0,i]=0)and(aT[i]='1')
  2052. then T[i]:='<';
  2053. if(Rp[0,i]=0)and(aT[i]='2')
  2054. then T[i]:='>';
  2055. if(Rp[0,i]=0)and(aT[i]='x')
  2056. then T[i]:='z'else
  2057. if aT[i]='x'then T[i]:='x';
  2058. if T[i]='z'then kz:=kz+1;Fz[i]:=kz;
  2059. if T[i]='x'then k:=k+1;Fx[i]:=k end;
  2060. F2:=0;j:=0;k:=0;for i:=1to Ct do begin
  2061. if F1[i]=0then F1[i]:=k;
  2062. if((Rp[0,i]>0)and((T[i]='R')or(T[i]='r'))
  2063. )or((Rp[0,i]<0)and((T[i]='B')or(T[i]='b')
  2064. ))then begin k:=k+1;F1[i]:=k;
  2065. if Rp[0,i]>0then F2:=F2+Rp[0,i];
  2066. if(Rp[0,i]<0)then F2:=F2-Rp[0,i]end;
  2067. if((Rp[0,i]>0)and((T[i]='B')or(T[i]='b'))
  2068. )or((Rp[0,i]<0)and((T[i]='R')or(T[i]='r')
  2069. ))or(T[i]='x')then begin
  2070. if Rp[0,i]>0 then F2:=F2-Rp[0,i];
  2071. if(Rp[0,i]<0)then F2:=F2+Rp[0,i]end;
  2072. F3L[i]:=F1[i]-((i-F0[i])-F1[i])end;
  2073.  
  2074.  
  2075. {RATINGS}if(Cs='r')and(Rr='o')and(zr=zu)
  2076. then begin Writeln;if St>0then Read(St);
  2077. if St>0then begin Readln;k:=1;k3:=1;
  2078. Readln(k2,kL);while i>0 do begin Read(i);
  2079. if(i=0)or(i=99)then begin Read(a);
  2080. for k1:=1to 7do Read(DSt[k,k1]);
  2081. k:=k+1;k3:=k3+1;end;SL0[i]:=SL0[i]+1;
  2082. if(i<28)and(SL0[i]=1)then
  2083. begin iL:=iL+1;Wh[iL]:=i end;
  2084. if(k2=k3-1)or(i=0)then goto SLs;
  2085. while not EoLn do begin Read(j);
  2086. SL1[i]:=SL1[i]+1;SL2[j]:=SL2[j]+1;
  2087. SL[i,j]:='-'; if SLn[i,j]=0then
  2088. SLn[i,j]:=k3 else SLf[i,j]:=SLf[i,j]+1
  2089. end;Readln end;SLs:
  2090.  
  2091. if op='p'then begin
  2092. for i:=1to Ct do Write(SL1[i],' ');
  2093. Writeln;for i:=1to Ct do
  2094. Write(SL0[i],' ');
  2095. Writeln;for i:=1to Ct do
  2096. Write(SL2[i],' ');
  2097. Writeln;for i:=1to iL-1 do
  2098. Write(Wh[i],' ');Writeln;goto G2 end;
  2099.  
  2100. for i:=1to Ct do Woi[i]:='_';
  2101. for i:=1to Ct do for j:=1to Ct do
  2102. if(i>j)or(i<j)then begin case(i)of
  2103. 1:a:='l';4:a:='i';7:a:='f';10:a:='c';
  2104. 2:a:='k';5:a:='h';8:a:='e';11:a:='b';
  2105. 3:a:='j';6:a:='g';9:a:='d';12:a:='a'end;
  2106. if Mo[i]=Mo[j]then
  2107. begin Woi[i]:=a;Woi[j]:=a end end;
  2108.  
  2109. if(St=6)or(St=7)then begin
  2110. for i:=1to 41do Write('_');Writeln;
  2111. Write(' ');for i:=1to Ct do
  2112. if Rn[i]>9then Write(Rn[i],' ')else
  2113. Write(Rn[i],' ');Writeln;
  2114. for i:=1to Ct do for j:=1to Ct do begin
  2115. if j=1then begin Write(' ');
  2116. if Rn[i]>9then Write(Rn[i],' ')
  2117. else Write(Rn[i],' ')end;
  2118. Write(SL[Mo[i],Mo[j]],' ');
  2119. if j=Ct then Writeln end end;
  2120.  
  2121. if(St=6)or(St=8)then begin
  2122. for i:=1to 41do Write('_');Writeln;
  2123. Write(' ');for i:=1to Ct do
  2124. if Rn[i]>9then Write(Rn[i],' ')else
  2125. Write(Rn[i],' ');Writeln;
  2126. for i:=1to Ct do for j:=1to Ct do begin
  2127. if j=1then begin Write(' ');
  2128. if Rn[i]>9then Write(Rn[i],' ')
  2129. else Write(Rn[i],' ')end;
  2130. k3:=SLf[Mo[i],Mo[j]];if k3=0then
  2131. Write(' ')else if k3>0then if k3>9
  2132. then Write(k3,' ')else Write(k3,' ');
  2133. if j=Ct then Writeln end{St=6/7:8}end;
  2134.  
  2135. if op='o'then begin
  2136. for i:=1to 41do Write('_');Writeln;
  2137. Write(' ');
  2138. for i:=1to Ct do if SL1[Mo[i]]>9then
  2139. Write(' ',SL1[Mo[i]])else
  2140. Write(' ',SL1[Mo[i]],' ');Writeln;
  2141. Write(' ');
  2142. for i:=1to Ct do if SL0[Mo[i]]>9then
  2143. Write(' ',SL0[Mo[i]])else
  2144. Write(' ',SL0[Mo[i]],' ');Writeln;
  2145. Write(' ');
  2146. for i:=1to Ct do if SL2[Mo[i]]>9then
  2147. Write(' ',SL2[Mo[i]])else
  2148. Write(' ',SL2[Mo[i]],' ');Writeln end;
  2149.  
  2150. Write('_____');for i:=1to Ct do
  2151. if Woi[i]='_'then Write('___')else
  2152. Write('_',Woi[i],'_');
  2153. for i:=1to 12-Ct do Write('___');Writeln;
  2154. Write('_____');for i:=1to Ct do
  2155. if Xw[i]=0then Write('___')
  2156. else if Xw[i]>9then Write('_',Xw[i])
  2157. else Write('_',Xw[i],'_');
  2158. for i:=1to 12-Ct do Write('___');Writeln;
  2159. Write(' ');for i:=1to Ct do
  2160. if Mo[i]>9then Write(Mo[i],' ')
  2161. else Write(Mo[i],' ');Writeln;
  2162. Write(' ');for i:=1to Ct do
  2163. if Rn[i]>9then Write(Rn[i],' ')else
  2164. Write(Rn[i],' ');Writeln;
  2165. for i:=1to Ct do for j:=1to Ct do begin
  2166. if j=1then begin
  2167. if Mo[i]>9then Write(Mo[i],' ')
  2168. else Write(Mo[i],' ');
  2169. if Rn[i]>9then Write(Rn[i],' ')
  2170. else Write(Rn[i],' ')end;
  2171. k3:=SLn[Mo[i],Mo[j]];if k3=0then
  2172. Write(' ')else if k3>0then if k3>9
  2173. then Write(k3,' ')else Write(k3,' ');
  2174. if j=Ct then Writeln end;
  2175. for i:=1to Ct do if Rn[i]=Wn[1]then f:=i;
  2176. Write('_____');for i:=1to Ct do if f=i
  2177. then Write('_^_')else Write('___');
  2178. for i:=1to 12-Ct do Write('___');Writeln;
  2179.  
  2180. j:=0;if k>kL then k:=kL+1;
  2181. for i:=1to k-1do begin j:=j+1;
  2182. for k1:=1to 7do Write(DSt[i,k1]);
  2183. if i>99then jL:=3 else jL:=4;
  2184. Write(i,' ');if(j=jL)and(i<k-1)
  2185. then begin Writeln;j:=0 end end;
  2186. if kL>0then begin Writeln;
  2187. for i:=1to 41do Write('_');Writeln end;
  2188. Write(' ');for i:=1to iL-1 do begin
  2189. Write(Wh[i],' ');
  2190. if iL=13then Writeln end; Writeln;
  2191. Write('0 ',St,' ______________(',An,
  2192. ')_________________');if(iL-1)>9then
  2193. Writeln(' ',iL-1)else Writeln('_ ',iL-1);
  2194. Writeln(k2,' ',kL);
  2195. if Wn[1]=0then Writeln('66 66')else begin
  2196. for i:=1to Ct-1do begin if Wo[i]>9then
  2197. Write(Wo[i],' ')else Write(Wo[i],' ');
  2198. if(i=10)and(Ct>10)then Writeln;if i=1
  2199. then Write(' ')end;Writeln(Wo[Ct])end;
  2200. Write('99 ',Yr-2020,Db[3]);
  2201. if Mt>9then Write(Mt)else Write('0',Mt);
  2202. if Dy>9then Write(Dy)else Write('0',Dy);
  2203. Write(Db[4]);if Cj<0then
  2204. Write(' ',Cj);Writeln;{St>0}end;
  2205. Writeln(f);
  2206. for i:=1to Ct do begin if Mo[i]>9then
  2207. Write(Mo[i],' ')else Write(Mo[i],' ');
  2208. if(i=10)and(Ct>10)then Writeln;
  2209. if i=1then Write(' ')end;Writeln;
  2210. for i:=1to Ct -1do begin if Xw[i]=0then
  2211. Write('____')else if Xw[i]>9then Write
  2212. (Xw[i],'__')else Write(Xw[i],'___');
  2213. if(i=10)and(Ct>10)then Writeln;if
  2214. i=1then Write('_')end;Writeln(Xw[Ct]);
  2215.  
  2216. Sj:=0;for i:=1to 19do Write('_');
  2217. Writeln(I8[zr]);Write(oEo,Xx,oa,' ');
  2218. if Wn[1]=0then Write('?');for i:=1
  2219. to Cw-1 do Write(Wn[i],' ');Writeln;
  2220. Writeln('__________________',oE,
  2221. '____________________');
  2222. k:=0;for i:=1 to Ct do begin k:=k+1;
  2223. if Rn[i]>9then Write(' ',Rn[i],' ')else
  2224. Write(' ',Rn[i],' ');if(k=10)and(i<Ct)
  2225. then begin Writeln;k:=0 end end;Writeln;
  2226. if f>10then a:='>'else a:='^';
  2227. if f>10then f:=f-10;Write('_');
  2228. for i:=1to 10 do if f=i then
  2229. Write(a,'___')else Write('____');Writeln;
  2230. k1:=1;k:=0;
  2231. if Ip='_'then rL:=zu else rL:=0;
  2232. for i:=1to Ct do Ap[0,i]:=Ap[0,i]/zu;
  2233.  
  2234. for i:=0to rL do for j:=1to Ct do begin
  2235. if(i=1)and(j=1)then begin
  2236. Write('_');for k2:=1to Ct do begin
  2237. if Woi[k2]='_'then Write('____')else
  2238. Write(Woi[k2],'___');
  2239. if(k2=10)and(Ct>10)then Writeln end;
  2240. for k2:=1to 10-Ct do Write('____');
  2241. Writeln;if zu=1then goto Sk1 end;
  2242.  
  2243. Ap[i,j]:=Ap[i,j]*mr;k:=k+1;
  2244. if(Ap[i,j]>=0)and(Ap[i,j]<9.5)then
  2245. Write(' ',Ap[i,j]:0:0,' ');
  2246. if Ap[i,j]>=9.5then
  2247. Write(' ',Ap[i,j]:0:0,' ');
  2248. if(Ap[i,j]<0)and(Ap[i,j]>-9.5)
  2249. then Write(Ap[i,j]:0:0,' ');
  2250. if(Ap[i,j]<0)and(Ap[i,j]<=-9.5)
  2251. then Write(Ap[i,j]:0:0,' ');
  2252. if(j=Ct)or(k=10){and(j<Ct-1))}then
  2253. begin if j=Ct then Writeln(I5[i])
  2254. else Writeln;k1:=k1+1;k:=0 end;
  2255.  
  2256. if(i=4)and(j=Ct)and(i<zu)then begin
  2257. k1:=k1+2;for k2:=1to Ct do begin
  2258. Ar[i,k2]:=(Ar[i,k2]/i)*mr;
  2259. if(Ar[i,k2]>=0)and(Ar[i,k2]<9.5)then
  2260. Write(' ',Ar[i,k2]:0:0,' ');
  2261. if Ar[i,k2]>=9.5then
  2262. Write(' ',Ar[i,k2]:0:0,' ');
  2263. if(Ar[i,k2]<0)and(Ar[i,k2]>-9.5)
  2264. then Write(Ar[i,k2]:0:0,' ');
  2265. if(Ar[i,k2]<0)and(Ar[i,k2]<=-9.5)
  2266. then Write(Ar[i,k2]:0:0,' ')end;
  2267. Writeln(I7[i]);Writeln end end;Sj:=Sj-k1;
  2268. Writeln('__________________',oE,
  2269. '____________________');
  2270. k1:=1;k:=0;for i:=1to Ct do begin k:=k+1;
  2271. if Rp[0,i]=0then Write(' - ')else if
  2272. Rp[0,i]<0then Write(Rp[0,i]:0:0,' ')
  2273. else Write(' ',Rp[0,i]:0:0,' ');
  2274. if((k=10)and(Ct>10))then begin
  2275. Writeln;k1:=k1+1;k:=0 end end;Writeln;
  2276. for i:=1to 41do Write('_');Writeln;
  2277. if Yy='_'then Sj:=Sj-1;
  2278. for i:=1to Ct do begin Write(Lo[i],' ');
  2279. if i=10then Writeln end;Writeln;
  2280. for i:=1to Ct do begin if Mo[i]>9then
  2281. Write(Mo[i],' ')else Write(Mo[i],' ');
  2282. if i=10then Writeln end;Writeln end; Sk1:
  2283.  
  2284. G2: if Ct=27then begin
  2285. for i:=1to 41do Write('_');Writeln;
  2286. Writeln(' 1234567890 1234567890 ',
  2287. '1234567');
  2288. for i:=1to Ct do for j:=1to Ct do begin
  2289. if j=1then if i>9then Write(i,' ')
  2290. else Write(' ',i,' ');
  2291. if(j=11)or(j=21)then Write(' ');
  2292. Write(SL[Mo[i],Mo[j]]);if j=Ct then begin
  2293. if i>9then Write(' ',i)else
  2294. Write(' ',i,' ');Writeln end;if(j=Ct)
  2295. and((i=11)or(i=21))then Writeln(' ',
  2296. '1234567890 1234567890 1234567')end;
  2297. Writeln(' 1234567890 1234567890 ',
  2298. '1234567');
  2299. for i:=1to 41do Write('_');Writeln end;
  2300.  
  2301. for i:=1to 16+Sj do Writeln End.
Success #stdin #stdout 0.67s 12900KB
stdin
o________________________________________
^ _________________________________ i 27
666 661 662 676 671 672 686 681 682
766 761 762 776 771 772 786 781 782
866 861 862 876 871 872 886 881 882 0
_________________________________________
. _________________________________ i 9
8	6	8	6	7	6	7	7	7			
7	6	6	7	8	6	6	8	6			
8	6	6	7	6	6	7	6	7
5 _______________________________________ 
_   - 07  _____________n___n_____r______e
D  _Hour  Dy  Mt  Year T_z . : _ S * 6
   04 07  10  11  2024 s-n o 7  -9
01 _____  0 - 0   99   _ . - .  00  00  0 
  T-0000                     .  --- --- .
_1___2___3___4___5___6___7___8___9___0__n
 .   .   .   .   .   .   .   .   .   .  
1 2 3 4 5 6 7 8 9
1 0 99 Newcastle_4     o / o
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
_________________________________________
  3 14 10 1 17 9 19 15 11 21 12 8 20 
0 9 ______________(6)_________________ 13
99   5
3    13  17  15  5   24
14   19  24  23  9
99 4c1121c
10   8   4   11  16  21
1    25  17  5   17  14  13  23
99 4c1121b
17   9   10  23
99 4c1110c
9    1   14  27  23  1   25
99 4c1029c
17   26  5   13
99 4c1029b
19   15  26  5   7
99 4b1028c
10   25  2   25  5   11
99 4j1024d
15   17  20  14  20  20
99 4l1014c
11   2   5   20
11   15  2   7   12  25
21   7   10  18
12   19  8   25  10
8    6   26  5   6
20   21  10  8   8   17
20   3   21  5   6
1    18  2   10  11
0 4d1006d
stdout
  k=7 Cj=9 Cto=0     Kc=0 Lc=0
_________________________________________
  __*(s)   67-(0407)   (10)   11   2024
 (120)c   0749(0300)  7(10)   11   2024
      W                 Ec    Wl    We

1    -   (6)   

_________________________________________
      0  11 4  0  0  11 8  0  8 
      0  2  1  0  0  2  2  0  2 
      2  2  2  8  1  2  3  1  3 
_________g________e__g__d__e__d__________
_________4__7________4__9_____9__________
      24 1  19 5  16 1  11 16 11 
      1  2  3  4  5  6  7  8  9  
24 1                             
1  2           2        9     9  
19 3           6                 
5  4                             
16 5                             
1  6           2        9     9  
11 7           9                 
16 8                             
11 9           9                 
______^__________________________________
4c1121c1  4c1121b2  4c1110c3  4c1029c4  
4c1029b5  
_________________________________________
  3 14 10 1 17 9 19 15 11 21 12 8 20 
0 9 ______________(6)_________________ 13
99   5
24   1   19  5   16  1   11  16  11
99 4c1110c
1
24   1   19  5   16  1   11  16  11  
_____4___7___________4___9_______9
___________________*
7s:  1 
__________________ Mm____________________
 1   2   3   4   5   6   7   8   9  
_^_______________________________________
-2   4   4  -5   6   4   2   6   2  
_____g___________e___g___d___e___d_______