fork(1) download
  1. program Hrm_RaP;{zMar67-8 08/12/2024}
  2. label
  3. 0,1,2,3,G1,G2,G3,G4,G5,G6,Sk1,SLb,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: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,St,oH,Rw,kL,kD,
  23. jL,iL:integer;
  24. r,WgP,mc,mr,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,Xx,Co,Pw,on,
  28. Zz,Yy,Aa,ET,Cl,nr,Rr,Ed,B0,T0,He,Te,Se,Ae
  29. ,Re,PmL,oa,ci,op:char;
  30. Db,De,Hb,Be,Hel,Bb,BDc,PN,Bei,Hol,BMc,DCe
  31. ,I1,I2,I3,I4,I5,I6,I7,I8,AEl,FSi,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,RBo,RBs,
  36. RBm,RBr,TsS,TsM,Bso,TmR,RBa,TsA:DHv;
  37. Hp,Ng,Nc,T1,T2,T3,Ml,Bp,Ba,Ep,F0,Ro,Rn,Wn
  38. ,Wh,La,Pc,Lo,Xw,Bo,Qo,D0,D1,D2,D3,SL0,SL2
  39. :Int;
  40. SLn,SLf:In2;
  41. M,N,Na,No,Nh,Nha,D,Rp,Ap:MGC;
  42. BR,SL,DSt:GCI;
  43.  
  44. Begin Readln(op);Read(Ii);for i:=
  45. 1to 35do Read(a);Read(ci);Readln(Ct);
  46.  
  47. if Ii='.'then begin
  48. for i:=1to Ct do begin
  49. Read(k);T1[i]:=k end;Readln;
  50. for i:=1to Ct do begin
  51. Read(k);T2[i]:=k end;Readln;
  52. for i:=1to Ct do begin
  53. Read(k);Ml[i]:=k end;
  54. for i:=1to Ct do begin
  55. if(T1[i]>8)and(T1[i]<16)then
  56. T1[i]:=T1[i]-8;if T1[i]=16then T1[i]:=8;
  57. if T1[i]>16then T1[i]:=T1[i]-16;
  58. if(T2[i]>8)and(T2[i]<16)then
  59. T2[i]:=T2[i]-8;if T2[i]=16then T2[i]:=8;
  60. if T2[i]>16then T2[i]:=T2[i]-16;
  61. if(Ml[i]>6)and(Ml[i]<12)then
  62. Ml[i]:=Ml[i]-6;if Ml[i]=12then Ml[i]:=6;
  63. if(Ml[i]>12)and(Ml[i]<18)then
  64. Ml[i]:=Ml[i]-12;if Ml[i]=18then Ml[i]:=6;
  65. if Ml[i]>18then Ml[i]:=Ml[i]-18 end end;
  66.  
  67. i:=0;k:=1;if Ii='^'then begin
  68. while k>0 do begin Read(k);i:=i+1;
  69. T3[i]:=k end;Ct:=i-1 end;Readln;
  70.  
  71. for i:=1to 2do begin Read(D1[i]);
  72. D1[i]:=D1[i]*100 end;
  73. for i:=1to 2do begin Read(D2[i]);
  74. D2[i]:=D2[i]*10 end;
  75. for i:=1to 2do begin Read(D3[i]);
  76. if D3[i]=7then D3[i]:=1 end;
  77. for i:=1to 2do D0[i]:=D1[i]+D2[i]+D3[i];
  78.  
  79.  
  80. for i:=1to 41do Write('_');Writeln;
  81. Readln(Sp);Read(Cl,a,a,a,sD,a,aST);
  82.  
  83. for i:=1to 15do Read(a);
  84. Read(PmL,a,a,a,Co);
  85. Readln(a,a,a,a,a,Cs,a,a,a,a,a,a,Gn);
  86. Read(Id,a,a,Ip);for i:=1to 19do Read(a);
  87. Readln(ET,Zz,on,a,Is,a,oa,a,Ih,a,Md,a,
  88. Ie,An);Readln(oE,Hr,a,Min,a,a,Dy,a,a,
  89. Mt,a,a,Yr,a,Xx,Yy,nr,a,Rr,a,oEo,a,Pi);
  90.  
  91. Readln(Ns,a,a,Ssn,a,a,Pm,a,a,Sk,a,
  92. a,a,Yy,a,Zz,a,Aa,a,Ed,a,SN1,a,SN2,k);
  93. Read(a,a,TNo);for i:=1to 21do Read(a);
  94. Readln(T0,a,a,Sp1,a,Sp2,a,B0);
  95.  
  96. Readln;Readln;if Cs='r'then begin for
  97. i:=1to 8do for j:=1to 8do SL[i,j]:=' ';
  98. for i:=1to Ct do Rn[i]:=i;
  99. j:=0;k:=1;while k>0 do begin
  100. Read(k);j:=j+1;Wn[j]:=k;Cw:=j end;
  101. if Wn[1]=0then Read(k);
  102. Read(St);if St>0then begin
  103. Readln;Readln;Readln;Readln;
  104. j:=0;k:=1;while k>0 do begin
  105. Read(k);j:=j+1;Wh[j]:=k end end end;
  106.  
  107.  
  108. {S/D}Hr:=(Hr*100)+Min;
  109. if Id='D'then begin
  110. if sD='-'then aST:=aST+60;
  111. if sD='+'then begin
  112. aST:=60-aST;sD:='-'end end;
  113.  
  114. {IN CALENDAR Date Adj}
  115. for za:=0to 1do begin
  116.  
  117. {MONTH START}if Yr=2024then begin
  118. e1:=05116;e4:=15034;e7:=22586;e10:=04318;
  119. e2:=16374;e5:=08225;e8:=09057;e11:=07497;
  120. e3:=10215;e6:=12345;e9:=12277;e12:=00297
  121. end;if Yr=2025then begin
  122. e1:=11155;e4:=20454;e7:=04077;e10:=08488;
  123. e2:=22113;e5:=13535;e8:=13587;e11:=12087;
  124. e3:=16065;e6:=17555;e9:=16597;e12:=05077
  125. end;if Yr=2026then begin
  126. e1:=16245;e4:=02335;e7:=09557;e10:=14368;
  127. e2:=04004;e5:=19415;e8:=19467;e11:=17577;
  128. e3:=21555;e6:=23435;e9:=22487;e12:=10567
  129. end;if Yr=2027then begin
  130. e1:=22135;e4:=08225;e7:=15437;e10:=20258;
  131. e2:=09504;e5:=01296;e8:=01348;e11:=23467;
  132. e3:=03446;e6:=05316;e9:=04368;e12:=16467;
  133. end;if Yr=2028then begin
  134. e1:=04036;e4:=14114;e7:=21316;e10:=02148;
  135. e2:=15404;e5:=07185;e8:=07227;e11:=05367;
  136. e3:=09335;e6:=11195;e9:=10247;e12:=22356;
  137. end;if Yr=2029then begin
  138. e1:=09525;e4:=20004;e7:=30197;e10:=08038;
  139. e2:=21293;e5:=13065;e8:=13107;e11:=11257;
  140. e3:=15225;e6:=17075;e9:=16137;e12:=04257;
  141. end;if Yr=2030then begin
  142. e1:=15425;e4:=01485;e7:=09077;e10:=13518;
  143. e2:=03184;e5:=18555;e8:=18587;e11:=17147;
  144. e3:=21125;e6:=22555;e9:=22017;e12:=10147;
  145. end;case(Mt)of
  146. 1:xy:=e1;5:xy:=e5;9:xy:=e9;
  147. 2:xy:=e2;6:xy:=e6;10:xy:=e10;
  148. 3:xy:=e3;7:xy:=e7;11:xy:=e11;
  149. 4:xy:=e4;8:xy:=e8;12:xy:=e12 end;
  150. k:=0;while xy>=10 do begin
  151. k:=k+1;xy:=xy-10 end;x:=xy;y:=k;
  152.  
  153. sM:=0;
  154. if(Dy<x)or((Dy=x)and(Hr<=y))then sM:=1;
  155. if((Mt=2)and(sM=0))or(Mt>2)then sY:=0
  156. else sY:=1;
  157.  
  158. {CALENDAR CONVERSION}
  159. Db[8]:='W';Db[6]:='W';Db[5]:='w';
  160. Db[4]:='a';Db[2]:='a';Db[1]:='l';
  161. if(Yr>=1984)and(Yr<2044)then begin
  162. Db[7]:='W';Db[3]:='g';Yo:=1984 end;
  163.  
  164. Ya:=Yr-Yo;while Ya>60do Ya:=Ya-60;
  165. if sY=0 then Yn:=(Yr-Yo)+1 else
  166. Yn:=Yr-Yo;while Yn>60 do Yn:=Yn-60;
  167.  
  168. Mn:=(Ya*12)+Mt-sM;
  169. while Mn>60do Mn:=Mn-60;
  170.  
  171. Yl:=Ya;k:=0;while Yl>=4do begin
  172. k:=k+1;Yl:=Yl-4 end;if Yl>0then
  173. k:=k+1;if(Yl=0)and(Ya>0)then k:=k+1;
  174. Dn:=(Ya*365)+k;case(Mt)of
  175. 1:j:=0; 4:j:=90; 7:j:=181;10:j:=273;
  176. 2:j:=31;5:j:=120;8:j:=212;11:j:=304;
  177. 3:j:=59;6:j:=151;9:j:=243;12:j:=334 end;
  178. if(Yl=0)and(Mt=2)then j:=j-1;
  179. Dn:=Dn+j+Dy-1;while Dn>=60do Dn:=Dn-60;
  180.  
  181. if (Hr>=0) and(Hr<100) then Hi:=0;
  182. if (Hr>=100) and(Hr<300) then Hi:=1;
  183. if (Hr>=300) and(Hr<500) then Hi:=2;
  184. if (Hr>=500) and(Hr<700) then Hi:=3;
  185. if (Hr>=700) and(Hr<900) then Hi:=4;
  186. if (Hr>=900) and(Hr<1100)then Hi:=5;
  187. if (Hr>=1100)and(Hr<1300)then Hi:=6;
  188. if (Hr>=1300)and(Hr<1500)then Hi:=7;
  189. if (Hr>=1500)and(Hr<1700)then Hi:=8;
  190. if (Hr>=1700)and(Hr<1900)then Hi:=9;
  191. if (Hr>=1900)and(Hr<2100)then Hi:=10;
  192. if (Hr>=2100)and(Hr<2300)then Hi:=11;
  193. if (Hr>=2300)and(Hr<2400)then Hi:=12;
  194. Hn:=(Dn*12)+Hi;while Hn>=60do Hn:=Hn-60;
  195.  
  196. for i:=1to 4do begin case(i)of
  197. 1:j:=5;2:j:=6;3:j:=7;4:j:=8 end;case(i)of
  198. 1:Sn:=Yn;2:Sn:=Mn;3:Sn:=Dn;4:Sn:=Hn end;
  199. z:=0; 0:repeat
  200. if(Db[i]='a')or(Db[i]='c')or(Db[i]='e')
  201. or(Db[i]='g')or(Db[i]='i')or(Db[i]='k')
  202. then Pp:='+'else Pp:='-';
  203.  
  204. if Sn>0then begin
  205. if Pp='-'then case(Db[j])of
  206. 'W':Db[j]:='F';'F':Db[j]:='E';
  207. 'E':Db[j]:='M';'M':Db[j]:='w';
  208. 'w':Db[j]:='W'end;
  209. case(Db[i])of
  210. 'a':Db[i]:='b';'g':Db[i]:='h';
  211. 'b':Db[i]:='c';'h':Db[i]:='i';
  212. 'c':Db[i]:='d';'i':Db[i]:='j';
  213. 'd':Db[i]:='e';'j':Db[i]:='k';
  214. 'e':Db[i]:='f';'k':Db[i]:='l';
  215. 'f':Db[i]:='g';'l':Db[i]:='a'end end;
  216. z:=z+1;until(Sn=0)or(z=Sn)end;
  217.  
  218. if za=0 then begin
  219. {DATE ADJUSTMENT & Output}k:=0;
  220. if(Yl=0)and(Mt=2)then k:=1;case(Mt)of
  221. 1:nD:=31+k;5:nD:=31+k; 9:nD:=30+k;
  222. 2:nD:=28+k;6:nD:=30+k;10:nD:=31+k;
  223. 3:nD:=31+k;7:nD:=31+k;11:nD:=30+k;
  224. 4:nD:=30+k;8:nD:=31+k;12:nD:=31+k end;
  225. Write(' ',Ih,Cl,Ie,'(',Xx,') ');
  226. if aST>99then Write(aST,sD)
  227. else Write(' ',aST,sD);
  228. Write('(');if Hr<9then Write('000',Hr);
  229. if(Hr<99)and(Hr>9)then Write('00',Hr);
  230. if(Hr<999)and(Hr>99)then Write('0',Hr);
  231. if Hr>999then Write(Hr);Write(') (');
  232. if Dy>9then Write(Dy,')')
  233. else Write('0',Dy,')');Write(' ');
  234. if Mt>9then Write(Mt,' ')else
  235. Write('0',Mt,' ');Writeln(Yr);
  236. k:=0;while Hr>=100do begin
  237. k:=k+1;Hr:=Hr-100 end;Hr:=(60*k)+Hr;
  238.  
  239. if sD='+'then begin Hr:=Hr+aST;
  240. if Hr>1440then begin Hr:=Hr-1440;
  241. if Dy=nD then Dy:=1 else Dy:=Dy+1;
  242. if Dy=1then if Mt=12then
  243. Mt:=1 else Mt:=Mt+1;
  244. if(Mt=1)and(Dy=1)then Yr:=Yr+1 end end;
  245. if sD='-'then begin Hr:=Hr-aST;
  246. if Hr<0then begin if aST<=60then
  247. Hr:=(60-(Hr-(Hr*2)))+1380;if aST>60then
  248. Hr:=(120-(Hr-(Hr*2)))+1320;
  249. if Dy=1then Dy:=nD else Dy:=Dy-1;
  250. if Dy=nD then if Mt=1then
  251. Mt:=12 else Mt:=Mt-1;
  252. if(Mt=12)and(Dy=nD)then Yr:=Yr-1 end end;
  253.  
  254. k:=0;while Hr>=60do begin
  255. k:=k+1;Hr:=Hr-60 end;Hr:=(100*k)+Hr end;
  256.  
  257. if za=1then begin
  258. {HOUR/MONTH Change/Al/Ho MONITOR Output}
  259. Ho:=Hr;k:=0;while Ho>=100do begin
  260. k:=k+1;Ho:=Ho-100 end;Ho:=(60*k)+Ho;
  261. case(Hi)of 0:Ho:=60-Ho;
  262. 1:Ho:=180-Ho;7:Ho:= 900-Ho;
  263. 2:Ho:=300-Ho;8:Ho:=1020-Ho;
  264. 3:Ho:=420-Ho;9:Ho:=1140-Ho;
  265. 4:Ho:=540-Ho;10:Ho:=1260-Ho;
  266. 5:Ho:=660-Ho;11:Ho:=1380-Ho;
  267. 6:Ho:=780-Ho;12:Ho:=1440-Ho end;
  268. if((Ho>=0)and(Ho<10))
  269. or((Ho>=110)and(Ho<120))then Po:=0;
  270. if((Ho>10)and(Ho<=20))
  271. or((Ho>=100)and(Ho<110))then Po:=1;
  272. if((Ho>20)and(Ho<=30))
  273. or((Ho>=90)and(Ho<100))then Po:=2;
  274. if((Ho>30)and(Ho<=40))
  275. or((Ho>=80)and(Ho<90))then Po:=3;
  276. if((Ho>40)and(Ho<=50))
  277. or((Ho>=70)and(Ho<80))then Po:=4;
  278. if((Ho>50)and(Ho<=60))
  279. or((Ho>=60)and(Ho<70))then Po:=5;
  280. case(Hi)of 0:Al:='a';
  281. 1:Al:='b';5:Al:='f'; 9:Al:='j';
  282. 2:Al:='c';6:Al:='g';10:Al:='k';
  283. 3:Al:='d';7:Al:='h';11:Al:='l';
  284. 4:Al:='e';8:Al:='i';12:Al:='a'end;
  285. Write(' (');if Ho<10then Write('00',Ho);
  286. if(Ho<100)and(Ho>9)then Write('0',Ho);
  287. if Ho>99then Write(Ho);
  288. Write(')',Al,' ');
  289.  
  290. if y<10then Write('000',y);
  291. if(y<100)and(y>9)then Write('00',y);
  292. if(y<1000)and(y>99)then Write('0',y);
  293. if y>999then Write(y);
  294. Write('(');if Hr<=9then Write('000',Hr);
  295. if(Hr<99)and(Hr>9)then Write('00',Hr);
  296. if(Hr<999)and(Hr>99)then Write('0',Hr);
  297. if Hr>999then Write(Hr);
  298. Write(') ',x,'(');
  299. if Dy>9then Write(Dy,')')
  300. else Write('0',Dy,')');Write(' ');
  301. if Mt>9then Write(Mt,' ')else
  302. Write('0',Mt,' ');Writeln(Yr);Writeln(
  303. ' ',Db[8],' ',' ',
  304. Db[7],Db[3],' ',Db[6],Db[2],' ',
  305. Db[5],Db[1]);Writeln end {za} end;
  306.  
  307. vh:=Db[7];vb:=Db[3];
  308. if(vh='W')and((vb='a')or(vb='b'))
  309. or(vh='F')and((vb='c')or(vb='d'))
  310. or(vh='E')and((vb='e')or(vb='f'))
  311. or(vh='M')and((vb='g')or(vb='h'))
  312. or(vh='w')and((vb='i')or(vb='j'))
  313. then Vd:=('kl');
  314. if(vh='W')and((vb='k')or(vb='l'))
  315. or(vh='F')and((vb='a')or(vb='b'))
  316. or(vh='E')and((vb='c')or(vb='d'))
  317. or(vh='M')and((vb='e')or(vb='f'))
  318. or(vh='w')and((vb='g')or(vb='h'))
  319. then Vd:=('ij');
  320. if(vh='W')and((vb='i')or(vb='j'))
  321. or(vh='F')and((vb='k')or(vb='l'))
  322. or(vh='E')and((vb='a')or(vb='b'))
  323. or(vh='M')and((vb='c')or(vb='d'))
  324. or(vh='w')and((vb='e')or(vb='f'))
  325. then Vd:=('gh');
  326. if(vh='W')and((vb='g')or(vb='h'))
  327. or(vh='F')and((vb='i')or(vb='j'))
  328. or(vh='E')and((vb='k')or(vb='l'))
  329. or(vh='M')and((vb='a')or(vb='b'))
  330. or(vh='w')and((vb='c')or(vb='d'))
  331. then Vd:=('ef');
  332. if(vh='W')and((vb='e')or(vb='f'))
  333. or(vh='F')and((vb='g')or(vb='h'))
  334. or(vh='E')and((vb='i')or(vb='j'))
  335. or(vh='M')and((vb='k')or(vb='l'))
  336. or(vh='w')and((vb='a')or(vb='b'))
  337. then Vd:=('cd');
  338. if(vh='W')and((vb='c')or(vb='d'))
  339. or(vh='F')and((vb='e')or(vb='f'))
  340. or(vh='E')and((vb='g')or(vb='h'))
  341. or(vh='M')and((vb='i')or(vb='j'))
  342. or(vh='w')and((vb='k')or(vb='l'))
  343. then Vd:=('ab');
  344.  
  345.  
  346. {zr LOOPS}
  347. for i:=0to b do ABs[i]:=0;
  348. for i:=1to 10do Wg[i]:=0;
  349. for i:=1to 27 do begin
  350. SL0[i]:=0;SL2[i]:=0 end;
  351.  
  352. z:=0;z0:=0;zP:=0; 1:repeat
  353.  
  354. for i:=1to 5do Wg[i]:=0;
  355.  
  356. zr:=0; 2:repeat zr:=zr+1;
  357.  
  358. {Xx MODES}
  359. if Xx='t'then begin zu:=3;case(zr)of
  360. 1:oEo:=7;2:oEo:=0;3:oEo:=8 end end;
  361. if Xx='d'then begin zu:=2;
  362. case(zr)of 1:oEo:=7;2:oEo:=0 end end;
  363. if Xx='s'then zu:=1;
  364. case(oEo)of 0:Ms:='nEo';
  365. 1:Ms:='nTr';4:Ms:='zTs';7:Ms:='nMm';
  366. 2:Ms:='zTr';5:Ms:='nMr';8:Ms:='zMm';
  367. 3:Ms:='nTs';6:Ms:='zMr';9:Ms:='nEr'end;
  368. on:=Ms[1];ET:=Ms[2];Gn:=Ms[3];
  369.  
  370. case(Pi)of-1:Pi:=161;-2:Pi:=314;
  371. -3:Pi:=809;-4:Pi:=1618;-5:Pi:=3141;
  372. -6:Pi:=8090;-7:Pi:=16180;-8:Pi:=31415;
  373. -9:Pi:=32767 end;
  374. if on='z'then oE[1]:='z';
  375. if ET='T'then oE[2]:=' 'else oE[2]:=ET;
  376. if Gn='r'then oE[3]:=' 'else oE[3]:=Gn;
  377.  
  378. {I1-I8 Loop Ind}
  379. if Ih='_'then I1[zr]:=' 'else I1[zr]:=Ih;
  380. if Cl='_'then I2[zr]:=' 'else I2[zr]:=Cl;
  381. if Ie='*'then I3[zr]:=' 'else I3[zr]:=Ie;
  382.  
  383. if on='z'then
  384. I4[zr]:='z'else I4[zr]:=' ';
  385. if ET='T'then I5[zr]:=' 'else I5[zr]:=ET;
  386. if Gn='r'then I6[zr]:=' 'else I6[zr]:=Gn;
  387. if oa='.'then
  388. I7[zr]:=' 'else I7[zr]:=':';
  389.  
  390. I8[zr]:='?';case(Pi)of 1:I8[zr]:=' ';
  391. 161:I8[zr]:='!';8090:I8[zr]:='(';
  392. 314:I8[zr]:='|';16180:I8[zr]:=')';
  393. 809:I8[zr]:='/';31415:I8[zr]:='^';
  394. 1618:I8[zr]:='<';32767:I8[zr]:='*';
  395. 3141:I8[zr]:='>'end;
  396.  
  397. mc:=30;if(on='z')or(ET='E')then mc:=10;
  398. mr:=10;if Pi=1then mc:=10;
  399.  
  400.  
  401. if Ii='.'then begin L:=Ml[z+1];
  402. H:=(T1[z+1]*10)+T2[z+1];o:=(H*10)+L end;
  403.  
  404. if Ii='^'then begin o:=T3[z+1];
  405. if o=0then goto G1;L:=o;k:=0;
  406. while L>=10do begin k:=k+1;L:=L-10 end;
  407. H:=k;L:=o-(H*10)end;
  408.  
  409. if zr=zu then begin
  410. FSi[z+1]:='_';Qo[z+1]:=0;
  411. if(o=D0[1])then begin D0[1]:=Rn[z+1];Qo
  412. [z+1]:=1;if op='o'then FSi[z+1]:='^'end;
  413. if(o=D0[2])then begin D0[2]:=Rn[z+1];Qo
  414. [z+1]:=2;if op='o'then FSi[z+1]:=':'end;
  415. end;case(o)of
  416. 666:oH:=1;766:oH:=5;
  417. 661:oH:=2;761:oH:=6;
  418. 676:oH:=3;776:oH:=7;
  419. 671:oH:=4;771:oH:=8 end;Lo[z+1]:=o;
  420. Bo[1]:=1;Bo[3]:=4;Bo[5]:=10;Bo[7]:=13;
  421. Bo[2]:=2;Bo[4]:=5;Bo[6]:=11;Bo[8]:=14;
  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 Write
  1515. (' - ');Writeln('(',An, ')')end;
  1516.  
  1517. {kT/kR/pT/B1-2}k:=Ns+z;kT:=k;kR:=Rn[z+1];
  1518. B1:='(';B2:=')';if Wn[1]=Qo[z+1]then
  1519. begin B1:=' ';B2:=' 'end;
  1520. if pT>Sk then pT:=Sk;
  1521.  
  1522.  
  1523. {TsA/Pm}if(Pm[3]='-')and(Rr='o')
  1524. and(zu<3)and(PmL='o')then begin
  1525. if zP=1 then begin Write(' ');
  1526. for i:=1to 5do begin
  1527. if i=Ep[Si]then Write('.',AEl[i],'.')else
  1528. Write(' ',AEl[i],' ')end;Writeln end;
  1529. k:=-1;
  1530. case(Pm[1])of'8':k:=3141;'9':k:=16180;
  1531. '1':k:=11;'2':k:=31;'3':k:=61;'4':k:=161;
  1532. '5':k:=314;'6':k:=618;'7':k:=1618 end;
  1533. for i:=1to 9do Pc[i]:=-1;
  1534. if Pm[5]>='1'then Pc[1]:=11;
  1535. if Pm[5]>='2'then Pc[2]:=31;
  1536. if Pm[5]>='3'then Pc[3]:=61;
  1537. if Pm[5]>='4'then Pc[4]:=161;
  1538. if Pm[5]>='5'then Pc[5]:=314;
  1539. if Pm[5]>='6'then Pc[6]:=618;
  1540. if Pm[5]>='7'then Pc[7]:=1618;
  1541. if Pm[5]>='8'then Pc[8]:=3141;
  1542. if Pm[5]>='9'then Pc[9]:=16180;
  1543. if(zP=Pc[1])or(zP=Pc[4])or(zP=Pc[7])
  1544. or(zP=Pc[2])or(zP=Pc[5])or(zP=Pc[8])
  1545. or(zP=Pc[3])or(zP=Pc[6])or(zP=Pc[9])
  1546. or((zP>0)and(zP<k))or(zP=Pi-1)then begin
  1547. if ET='E'then begin a:='o';
  1548. for i:=1to 5do e[i]:=Es0[i]*mc end;
  1549. if ET='T'then begin a:='s';
  1550. for i:=1to 5do e[i]:=Ts[i]*mc end;
  1551. if ET='M'then begin a:='m';
  1552. for i:=1to 5do e[i]:=TsM[i]*mc end;
  1553. case(a)of'o':Write(He,'-');
  1554. 's':Write(Te,':');'m':Write(Se,'.')end;
  1555. Write(' ');for i:=1to 5do begin
  1556. if(e[i]>0)and(e[i]<0.95)then
  1557. Write('<',(e[i]*10):0:0,' ')else begin
  1558. if e[i]>=0then Write(' ');
  1559. if(e[i]<9.5)and(e[i]>=0)
  1560. then Write(e[i]:0:0,' ');
  1561. if(e[i]>9.5)and(e[i]>=0)
  1562. then Write(e[i]:0:0);
  1563. if(e[i]>-9.5)and(e[i]<0)
  1564. then Write(e[i]:0:0,' ');
  1565. if(e[i]<-9.5)then Write(e[i]:0:0);
  1566. end end;Writeln(' ',zP,' ')end;
  1567. if(zP=0)and(z>0)then Writeln end;
  1568.  
  1569. {Rw/Xw}if zP=0then begin Rw:=0;
  1570. for i:=1to 99do if Wh[i]=Rn[kT]
  1571. then begin Rw:=i;Xw[kT]:=Rw end end;
  1572.  
  1573.  
  1574. if(zu>1)and(zP=0)and(zr=1)and(kT>1)
  1575. then Writeln;if Qo[z+1]=0then Oo:='n';if
  1576. (Rr='R')or(Rr='r')or(Oo='n')then goto G5;
  1577. {OUTPUT 0}Pw:='_';
  1578. if WgP>0then Pw:='<';
  1579. if WgP<0then Pw:='>';
  1580. if Md<='S'then begin Write(Yr-2000);
  1581. if Mt>9then Write(Mt)else Write('0',Mt);
  1582. if Dy>9then Write(Dy)else Write('0',Dy);
  1583. Write(I4[zr],I5[zr],I6[zr],'___',Pw);
  1584. if Rw=0then Write('__')else if Rw>9then
  1585. Write(Rw)else Write(Rw,'_');
  1586. Write('____',Rn[kT],FSi[kT],'_');
  1587.  
  1588. if Is='.'then begin
  1589. for i:=1to b do e[i]:=RBr[i]*mc;
  1590. for i:=1to 5do begin if i=h1 then begin
  1591. if(e[8]>0)and(e[8]<0.95)then
  1592. Write('<',(e[8]*10):0:0,'_')else begin
  1593. if e[8]<0then begin
  1594. if e[8]<=-9.5then Write(e[8]:0:0);
  1595. if e[8]>-9.5then Write(e[8]:0:0,'_')end;
  1596. if e[8]>=0then begin
  1597. if e[8]<9.5then Write(' ',e[8]:0:0,'_');
  1598. if e[8]>=9.5then
  1599. Write(' ',e[8]:0:0)end end end;
  1600. if i=h2 then begin
  1601. if(e[9]>0)and(e[9]<0.95)then
  1602. Write('<',(e[9]*10):0:0,'_')else begin
  1603. if e[9]<0 then begin
  1604. if e[9]<=-9.5then Write(e[9]:0:0);
  1605. if e[9]>-9.5then Write(e[9]:0:0,'_')end;
  1606. if e[9]>=0then begin
  1607. if e[9]<9.5then Write(' ',e[9]:0:0,'_');
  1608. if e[9]>=9.5then
  1609. Write(' ',e[9]:0:0)end end end;
  1610. if Hel[i]=' 'then Write('___')end end;
  1611. if Is='^'then for i:=1to 17do Write('_');
  1612. Writeln('_',I8[zr],Po,Pe);
  1613.  
  1614. {1}for i:=5to 8do if Db[i]='o'
  1615. then Write(' ')else Write(Db[i],' ');
  1616.  
  1617. Write(' ',B1,' ',(10*H)+L,' ',B2,' ');
  1618.  
  1619. if u0>0then begin
  1620. r:=(RBd[u0]-RBd[v0])*100;
  1621. if r>=99.5then r:=99;
  1622. if r<=-99.5then r:=-99;Write(Sc);
  1623. if r<0then begin
  1624. if r<=-9.5then Write(r:0:0);
  1625. if r>-9.5then Write(r:0:0,' ')end;
  1626. if r>=0then begin
  1627. if r<9.5then Write(' ',r:0:0,' ');
  1628. if r>=9.5then Write(' ',r:0:0)end;
  1629. Write(Oc)end;
  1630. if u0=0then Write('___',uv,'_');
  1631.  
  1632. if oa=':'then
  1633. for i:=1to b do e[i]:=RBa[i]*mc else
  1634. case(ET)of
  1635. 'E':for i:=1to b do e[i]:=Bso[i]*mc;
  1636. 'T':for i:=1to b do e[i]:=RBd[i]*mc;
  1637. 'M':for i:=1to b do e[i]:=RBm[i]*mc end;
  1638. for i:=1to b do if(e[i]>-0.000000000001)
  1639. and(e[i]<=0.000000000001)then e[i]:=0;
  1640. for i:=1to 5do begin if i=h1 then begin
  1641. if(e[8]>0)and(e[8]<0.95)then
  1642. Write('<',(e[8]*10):0:0,'_')else begin
  1643. if e[8]<0then begin
  1644. if e[8]<=-9.5then Write(e[8]:0:0);
  1645. if e[8]>-9.5then Write(e[8]:0:0,'_')end;
  1646. if e[8]>=0then begin
  1647. if e[8]<9.5then Write(' ',e[8]:0:0,'_');
  1648. if e[8]>=9.5then
  1649. Write(' ',e[8]:0:0)end end end;
  1650. if i=h2 then begin
  1651. if(e[9]>0)and(e[9]<0.95)then
  1652. Write('<',(e[9]*10):0:0,'_')else begin
  1653. if e[9]<0 then begin
  1654. if e[9]<=-9.5then Write(e[9]:0:0);
  1655. if e[9]>-9.5then Write(e[9]:0:0,'_')end;
  1656. if e[9]>=0then begin
  1657. if e[9]<9.5then Write(' ',e[9]:0:0,'_');
  1658. if e[9]>=9.5then
  1659. Write(' ',e[9]:0:0)end end end;
  1660. if Hel[i]=' ' then Write('___')end;
  1661.  
  1662. {2}Writeln('__',Vd);
  1663. for i:=1to 4do if Db[i]='o'then
  1664. Write(' ')else Write(Db[i],' ');
  1665. Write(' ');
  1666. if x=Oi then Write('___|___ ')else begin
  1667. if(x=0)and(y=0)then Write('_______ ')
  1668. else Write(s1,'__',s4,'__',s3,' ')end;
  1669. if uv='~'then Write(' ',uv,' ')
  1670. else Write(' ');
  1671.  
  1672. for i:=1to 5do begin
  1673. if i=h1 then Write(Hol[8],Hb[8],Bei[8]);
  1674. if i=h2 then Write(Hol[9],Hb[9],Bei[9]);
  1675. if Hel[i]=' 'then Write(' ')end;
  1676.  
  1677. {3}Writeln;if Cl=':'then Write(':')
  1678. else Write(' ');Write(I7[zr],' ');
  1679.  
  1680. if(x=Oi)or(x=0)then Write(' ')else
  1681. if x>0then Write(u1,Hb[x],' ');
  1682. Write(c1,Sf,u2,' ',BR[Si,Oi],' ',
  1683. u3,Hb[Oi],c3,' ');
  1684. if(x=Oi)or(y=0)then Write(' ')else
  1685. if y>0then Write(Hb[y],u4,' ');
  1686.  
  1687. for i:=1to 6do begin
  1688. if i=Si then Write('(',Sf,Bei[i])else
  1689. if i=Oi then Write('•',Hb[i],Bei[i])
  1690. else Write(' ',Hb[i],Bei[i])end;Writeln;
  1691.  
  1692. {4}if Cs='r'then k:=kR else k:=kT;
  1693. if k<=9then Write('(',k,') ');
  1694. if(k>9)and(k<=99)then Write(k,') ');
  1695. if k>99then Write(k,')');
  1696.  
  1697. if(x=Oi)or(x=0)then Write(' ')else
  1698. if x>0then begin Write(' ');
  1699. if e[x]<0then begin
  1700. if e[x]<=-9.5then Write(e[x]:0:0);
  1701. if e[x]>-9.5then Write(e[x]:0:0,' ')end;
  1702. if e[x]>=0then begin
  1703. if e[x]<9.5then Write(' ',e[x]:0:0,' ');
  1704. if e[x]>=9.5then Write(' ',e[x]:0:0)end
  1705. end;
  1706. if e[Si]<0then begin
  1707. if e[Si]<=-9.5then Write(e[Si]:0:0);
  1708. if e[Si]>-9.5then Write(e[Si]:0:0,' ')
  1709. end;
  1710. if e[Si]>=0then begin if e[Si]<9.5then
  1711. Write(' ',e[Si]:0:0,' ');
  1712. if e[Si]>=9.5then Write(' ',e[Si]:0:0)
  1713. end;Write(' ',s2,' ');
  1714. if e[Oi]<0then begin if e[Oi]<=-9.5
  1715. then Write(e[Oi]:0:0);if e[Oi]>-9.5
  1716. then Write(e[Oi]:0:0,' ')end;
  1717. if e[Oi]>=0then begin if e[Oi]<9.5then
  1718. Write(' ',e[Oi]:0:0,' ');if e[Oi]>=9.5
  1719. then Write(' ',e[Oi]:0:0)end;
  1720.  
  1721. if x=Oi then Write(' ')else
  1722. if y>0then begin if e[y]<0then begin
  1723. if e[y]<=-9.5then Write(e[y]:0:0);
  1724. if e[y]>-9.5then Write(e[y]:0:0,' ')end;
  1725. if e[y]>=0then begin
  1726. if e[y]<9.5then Write(' ',e[y]:0:0,' ');
  1727. if e[y]>=9.5then
  1728. Write(' ',e[y]:0:0)end end;
  1729.  
  1730. if y=0then Write(' ');Write(' ');
  1731.  
  1732. for i:=1to 5do if i=Mi then
  1733. Write(Hb[7],Bei[7],' ')else Write(' ');
  1734. if 6=Mi then Write(Hb[7],Bei[7])
  1735. else Write(' ');
  1736.  
  1737. {5}Writeln;
  1738. if Ih='_'then Write(' ')else Write(Ih);
  1739. Write(' ');
  1740. if Ie='*'then Write(' ')else Write(Ie);
  1741. if(x=Oi)or(x=0)then Write(' ')
  1742. else if x>0then begin Write(' ');
  1743. if(RBP[x]>=0)and(RBP[x]<9.5)
  1744. then Write(PN[x],RBP[x]:0:0,' ');
  1745. if(RBP[x]>=9.5)and(RBP[x]<=99.5)
  1746. then Write(PN[x],RBP[x]:0:0)end;
  1747.  
  1748. if(RBP[Si]>=0)and(RBP[Si]<9.5)
  1749. then Write(PN[Si],RBP[Si]:0:0,' ');
  1750. if(RBP[Si]>=9.5)and(RBP[Si]<=99.5)
  1751. then Write(PN[Si],RBP[Si]:0:0);
  1752. r:=(e[Si]-e[Oi])*10;
  1753. if r>=99.5then r:=99;
  1754. if r<=-99.5then r:=-99;
  1755. if r<0then begin
  1756. if r<=-9.5then Write(r:0:0);
  1757. if r>-9.5then Write(r:0:0,' ')end;
  1758. if r>=0then begin
  1759. if r<9.5then Write(' ',r:0:0,' ');
  1760. if r>=9.5 then Write(' ',r:0:0)end;
  1761. if(RBP[Oi]>=0)and(RBP[Oi]<9.5)
  1762. then Write(PN[Oi],RBP[Oi]:0:0,' ');
  1763. if(RBP[Oi]>=9.5)and(RBP[Oi]<=99.5)
  1764. then Write(PN[Oi],RBP[Oi]:0:0);
  1765.  
  1766. if x=Oi then Write(' ')else
  1767. if y>0 then begin
  1768. if(RBP[y]>=0)and(RBP[y]<9.5)
  1769. then Write(PN[y],RBP[y]:0:0,' ');
  1770. if(RBP[y]>=9.5)and(RBP[y]<=99.5)
  1771. then Write(PN[y],RBP[y]:0:0)end;
  1772.  
  1773. if y=0then Write(' ');Write(' ');
  1774.  
  1775. for i:=1to 6do begin
  1776. if(e[i]>0)and(e[i]<0.95)then
  1777. Write('<',(e[i]*10):0:0,' ')else begin
  1778. if e[i]<0then begin
  1779. if e[i]<=-9.5then Write(e[i]:0:0);
  1780. if e[i]>-9.5then Write(e[i]:0:0,' ')end;
  1781. if e[i]>=0then begin if e[i]<9.5
  1782. then Write(' ',e[i]:0:0,' ');if e[i]>=9.5
  1783. then Write(' ',e[i]:0:0)end end end;
  1784.  
  1785. {6}Writeln;if oa=':'then Write(Ae)
  1786. else case(ET)of'E':Write(He);
  1787. 'T':Write(Te);'M':Write(Se)end;
  1788. r:=WgP*mr;if(r>0)and(r<0.95)then
  1789. Write('<',(r*10):0:0,' ')else begin
  1790. if r>=0then Write('_');if(r<9.5)and(r>=0)
  1791. then Write(r:0:0,' ');
  1792. if(r>9.5)and(r>=0)then Write(r:0:0);
  1793. if(r>-9.5)and(r<0)then Write(r:0:0,' ');
  1794. if(r<-9.5)then Write(r:0:0)end;
  1795. Write(' ');if oa=':'then
  1796. for i:=1to 5do eE[i]:=TsA[i]*mc else
  1797. case(ET)of
  1798. 'E':for i:=1to 5do eE[i]:=Es0[i]*mc;
  1799. 'T':for i:=1to 5do eE[i]:=Ts[i]*mc;
  1800. 'M':for i:=1to 5do eE[i]:=TsM[i]*mc end;
  1801. for i:=1to 5do begin
  1802. if(eE[i]>0)and(eE[i]<0.95)then
  1803. Write('<',(eE[i]*10):0:0,' ')else begin
  1804. if eE[i]>=0then Write(' ');
  1805. if(eE[i]<9.5)and(eE[i]>=0)
  1806. then Write(eE[i]:0:0,' ');
  1807. if(eE[i]>9.5)and(eE[i]>=0)
  1808. then Write(eE[i]:0:0);
  1809. if(eE[i]>-9.5)and(eE[i]<0)
  1810. then Write(eE[i]:0:0,' ');
  1811. if(eE[i]<-9.5)then
  1812. Write(eE[i]:0:0)end end;
  1813. if(eE[i]>9.5)or(eE[i]>-9.5)then
  1814. Write('__')else Write(' _');
  1815.  
  1816. for i:=1to 6do begin
  1817. if i=Mi then begin
  1818. if(e[7]>0)and(e[7]<0.95)then
  1819. Write('<',(e[7]*10):0:0,' ')else begin
  1820. if e[7]<0then begin
  1821. if e[7]<=-9.5then Write(e[7]:0:0);
  1822. if e[7]>-9.5then Write(e[7]:0:0,'_')end;
  1823. if e[7]>=0then begin if e[7]<9.5
  1824. then Write(' ',e[7]:0:0,'_');if e[7]>=9.5
  1825. then Write(' ',e[7]:0:0)end end end;
  1826. if (i>Mi)or(i<Mi)then Write('___')end;
  1827. Writeln('_') {Md<='S'}end;
  1828.  
  1829.  
  1830. {7}if Md<='M'then begin {M Mode}
  1831. Write(' ');
  1832. for i:=1to b do e[i]:=Bs[i]*100;
  1833. if b>=8then if e[8]<9.5 then
  1834. Write(e[8]:0:0,' ')else Write(e[8]:0:0);
  1835. if b<8then Write(' ');Write(' ');
  1836. if e[7]<9.5then Write(e[7]:0:0,' ')
  1837. else Write(e[7]:0:0);Write(' ');
  1838. if b=9then if e[9]<9.5then
  1839. Write(e[9]:0:0,' ')else Write(e[9]:0:0);
  1840. if b<9then Write(' ');Write(' ');
  1841. for i:=1to 6do if e[i]<9.5
  1842. then Write(e[i]:0:0,' ')
  1843. else Write(e[i]:0:0,' ');Writeln;
  1844.  
  1845. {8}Write(' ');
  1846. for i:=1to b do e[i]:=RBg[i]*100;
  1847. if b<8then Write(' ')else
  1848. if e[8]<9.5then Write(e[8]:0:0,' ')
  1849. else Write(e[8]:0:0);Write(' ');
  1850. if e[7]<9.5then Write(e[7]:0:0,' ')
  1851. else Write(e[7]:0:0);Write(' ');
  1852. if b<9then Write(' ')else
  1853. if e[9]<9.5then Write(e[9]:0:0,' ')
  1854. else Write(e[9]:0:0);Write(' ');
  1855. for i:=1to 6do
  1856. if e[i]<9.5then Write(e[i]:0:0,' ')
  1857. else Write(e[i]:0:0,' ');Writeln;
  1858.  
  1859. {9}Write(' ');
  1860. for i:=1to b do e[i]:=RBc[i]*100;
  1861. if b<8then Write(' ')else
  1862. if e[8]<9.5then Write(e[8]:0:0,' ')
  1863. else Write(e[8]:0:0);Write(' ');
  1864. if e[7]<9.5then Write(e[7]:0:0,' ')
  1865. else Write(e[7]:0:0);Write(' ');
  1866. if b<9then Write(' ')else
  1867. if e[9]<9.5then Write(e[9]:0:0,' ')
  1868. else Write(e[9]:0:0);Write(' ');
  1869. for i:=1to 6do
  1870. if e[i]<9.5then Write(e[i]:0:0,' ')
  1871. else Write(e[i]:0:0,' ');
  1872.  
  1873. {10}Writeln;Write('_____');
  1874. for i:=1to b do
  1875. if PN[i]=' 'then PN[i]:='_';
  1876. if b>=8then begin if RBP[8]<9.5
  1877. then Write(PN[8],RBP[8]:0:0,'_')
  1878. else Write(PN[8],RBP[8]:0:0)end;
  1879. if b<8then Write('___');Write('___');
  1880. if RBP[7]<9.5
  1881. then Write(PN[7],RBP[7]:0:0,'____')
  1882. else Write(PN[7],RBP[7]:0:0,'___');
  1883. if b=9then begin if RBP[9]<9.5
  1884. then Write(PN[9],RBP[9]:0:0,'_')
  1885. else Write(PN[9],RBP[9]:0:0)end;
  1886. if b<9then Write('___');Write('__');
  1887. for i:=1to 6do begin if RBP[i]<9.5
  1888. then Write(PN[i],RBP[i]:0:0,'_')
  1889. else Write(PN[i],RBP[i]:0:0)end;
  1890. Writeln('_') {M Mode} end; G3:
  1891.  
  1892. if(zP=1)and(Pi>2)then goto G5;
  1893.  
  1894. z0:=z0+1; G5: zP:=zP+1;
  1895. kP:=zP;while kP>=Pi do kP:=kP-Pi;
  1896.  
  1897. if kP>0then goto G4;
  1898.  
  1899.  
  1900. if(Rr='o')and(zr<7)and(Oo='o')then begin
  1901. if(Yy='_')then begin if Gn='r'then
  1902. Write(Re,'_ ')else Write(Re,' ');
  1903.  
  1904. for i:=1to 5do e[i]:=EcR[i]*mc;
  1905. Write(' ');for i:=1to 5do begin
  1906. if(e[i]>0)and(e[i]<0.95)then
  1907. Write('<',(e[i]*10):0:0,' ')else begin
  1908. if e[i]>=0then Write(' ');
  1909. if(e[i]<9.5)and(e[i]>=0)
  1910. then Write(e[i]:0:0,' ');
  1911. if(e[i]>9.5)and(e[i]>=0)
  1912. then Write(e[i]:0:0);
  1913. if(e[i]>-9.5)and(e[i]<0)
  1914. then Write(e[i]:0:0,' ');if(e[i]<-9.5)
  1915. then Write(e[i]:0:0)end end;
  1916.  
  1917. if(Zz='-')or(Zz='.')then begin
  1918.  
  1919. if Is='.'then begin Write(' ');
  1920. for i:=1to b do e[i]:=RBr[i]*mc;
  1921. for i:=1to 6do begin
  1922. if(e[i]>0)and(e[i]<0.95)then
  1923. Write('<',(e[i]*10):0:0,' ')else begin
  1924. if e[i]<0then begin
  1925. if e[i]<=-9.5then Write(e[i]:0:0);
  1926. if e[i]>-9.5then Write(e[i]:0:0,' ')end;
  1927. if e[i]>=0then begin if e[i]<9.5
  1928. then Write(' ',e[i]:0:0,' ');if e[i]>=9.5
  1929. then Write(' ',e[i]:0:0)end end end;
  1930. Writeln;Write(' ')end;case(Zz)of
  1931. '-':for i:=1to 5do e[i]:=Es0[i]*mc;
  1932. '.':for i:=1to 5do e[i]:=TmR[i]*mr end;
  1933. Write(' ');for i:=1to 5do begin
  1934. if(e[i]>0)and(e[i]<0.95)then
  1935. Write('<',(e[i]*10):0:0,' ')else begin
  1936. if e[i]>=0then Write(' ');
  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);
  1941. if(e[i]>-9.5)and(e[i]<0)
  1942. then Write(e[i]:0:0,' ');
  1943. if(e[i]<-9.5)then
  1944. Write(e[i]:0:0)end end;
  1945. if(e[i]>9.5)or(e[i]>-9.5)then
  1946. Write(' ')else Write(' ')end;
  1947.  
  1948. if Is='.'then begin
  1949. for i:=1to 6do begin
  1950. if i=Mi then begin
  1951. if(e[7]>0)and(e[7]<0.95)then
  1952. Write('<',(e[7]*10):0:0)else begin
  1953. if e[7]<0then begin
  1954. if e[7]<=-9.5then Write(e[7]:0:0);
  1955. if e[7]>-9.5then Write(e[7]:0:0)end;
  1956. if e[7]>=0then begin if e[7]<9.5
  1957. then Write(' ',e[7]:0:0);if e[7]>=9.5
  1958. then Write(e[7]:0:0)end end end;
  1959. if (i>Mi)or(i<Mi)then Write(' ')end;
  1960. end;Writeln;
  1961.  
  1962. if ci='i'then begin
  1963. for i:=1to b do Mli[i]:=' ';
  1964. for i:=1to b do
  1965. if(Bei[i]='|')then Mli[Ep[i]]:='|';
  1966. for i:=1to b do if(i=Mi)or(i=7)then
  1967. Mli[Ep[i]]:='*';for i:=1to b do
  1968. if(Bei[i]='/')then Mli[Ep[i]]:='/';
  1969. Write(' ');for i:=1to 5do
  1970. Write(Mli[i],' ');Writeln end end end;
  1971.  
  1972.  
  1973. {P-1}
  1974. Ap[zr,kT]:=WgP*mr;
  1975. Ap[0,kT]:=Ap[0,kT]+Ap[zr,kT];
  1976. if WgP>0then Rp[zr,kT]:=1;
  1977. if WgP=0then Rp[zr,kT]:=0;
  1978. if(WgP<0)and(WgP>-99)then Rp[zr,kT]:=-1;
  1979. Rp[0,kT]:=Rp[0,kT]+Rp[zr,kT];
  1980.  
  1981.  
  1982. until zr=zu;
  1983. z:=z+1;until (o=0)or(kT=Sk)or(z=Ct); G1:
  1984.  
  1985.  
  1986. {P-2}
  1987. if Ed=':'then for i:=1to Ct do begin
  1988. if Rp[0,i]<0 then Rp[0,i]:=-2;
  1989. if Rp[0,i]>0 then Rp[0,i]:=1 end;
  1990. if Ed='.'then for i:=1to Ct do begin
  1991. r:=1;if zu>9then r:=9/zu;
  1992. Rp[0,i]:=Rp[0,i]/(1/r) end;
  1993.  
  1994.  
  1995. {RATINGS}if(Cs='r')and(Rr='o')and(zr=zu)
  1996. then begin Writeln;if St>0then Read(St);
  1997. if St>0then begin Readln;k:=1;k3:=1;
  1998. Readln(k2,kL);while i>0 do begin SLb:
  1999. Read(i);if(i=0)or(i=99)then begin
  2000. Read(a);for k1:=1to 7do Read(DSt[k,k1]);
  2001. k:=k+1;k3:=k3+1 end;SL0[i]:=SL0[i]+1;
  2002. if(i<9)and(SL0[i]=1)then
  2003. begin iL:=iL+1;Wh[iL]:=i end;
  2004. if(k2=k3-1)or(i=0)then goto SLs;
  2005. if i=99 then goto SLb;Read(j);
  2006. SL2[j]:=SL2[j]+1;SL[i,j]:='-';
  2007. if SLn[i,j]=0then SLn[i,j]:=k3
  2008. else SLf[i,j]:=SLf[i,j]+1 end;SLs:
  2009.  
  2010. if(St=6)or(St=7)then begin
  2011. Write('______');for i:=1to Ct do Write
  2012. ('__',FSi[i],'_');Writeln('___');
  2013. Writeln(' ',
  2014. '1 2 3 4 5 6 7 8');
  2015. for i:=1to Ct do for j:=1to Ct do begin
  2016. if j=1then begin Write(' ',Rn[i],' ');
  2017. if op='p'then Write(' ')else
  2018. if op='o'then if FSi[i]='_'then
  2019. Write(' ')else Write(FSi[i],' ')end;
  2020. Write(SL[i,j],' ');
  2021. if j=Ct then Writeln end end;
  2022.  
  2023. if(St=6)or(St=8)then begin
  2024. Write('______');for i:=1to Ct do Write
  2025. ('__',FSi[i],'_');Writeln('___');
  2026. Writeln(' ',
  2027. '1 2 3 4 5 6 7 8');
  2028. for i:=1to Ct do for j:=1to Ct do begin
  2029. if j=1then begin Write(' ',Rn[i],' ');
  2030. if op='p'then Write(' ')else
  2031. if op='o'then if FSi[i]='_'then
  2032. Write(' ')else Write(FSi[i],' ')end;
  2033. k3:=SLf[i,j];if k3=0then
  2034. Write(' ')else if k3>0then if k3>9
  2035. then Write(k3,' ')else Write(k3,' ');
  2036. if j=Ct then Writeln end{St=6/7:8}end;
  2037.  
  2038. {^/:}if(SL[D0[1],D0[2]]='-')then
  2039. SLf[D0[1],D0[2]]:=SLf[D0[1],D0[2]]+1;
  2040. if(SL[D0[2],D0[1]]='-')then
  2041. SLf[D0[2],D0[1]]:=SLf[D0[2],D0[1]]+1;
  2042.  
  2043. Writeln;Write(' ');
  2044. i:=0;for j:=1to 8do begin
  2045. Ap[i,j]:=Ap[i,j]/zu;
  2046. if(Ap[i,j]>=0)and(Ap[i,j]<9.5)then
  2047. Write(' ',Ap[i,j]:0:0,' ');
  2048. if Ap[i,j]>=9.5then
  2049. Write(' ',Ap[i,j]:0:0,' ');
  2050. if(Ap[i,j]<0)and(Ap[i,j]>-9.5)
  2051. then Write(Ap[i,j]:0:0,' ');
  2052. if(Ap[i,j]<0)and(Ap[i,j]<=-9.5)
  2053. then Write(Ap[i,j]:0:0,' ')end;Writeln;
  2054.  
  2055. Write('______');for i:=1to Ct do
  2056. Write('__',FSi[i],'_');Writeln('___');
  2057. Write(' ');
  2058. for i:=1to Ct do if SL0[i]>9then
  2059. Write(' ',SL0[i])else
  2060. Write(' ',SL0[i],' ');Writeln;
  2061. Write(' ');
  2062. for i:=1to Ct do if SL2[i]>9then
  2063. Write(' ',SL2[i])else
  2064. Write(' ',SL2[i],' ');Writeln;
  2065.  
  2066. Write('______');for i:=1to Ct do
  2067. if Xw[i]=0then Write('____')
  2068. else if Xw[i]>9then Write('__',Xw[i])else
  2069. Write('__',Xw[i],'_');Writeln('___');
  2070. if op='p'then Writeln(' ',
  2071. '1 2 4 5 10 11 13 14');
  2072. Writeln(' ',
  2073. '1 2 3 4 5 6 7 8');
  2074.  
  2075. for i:=1to Ct do for j:=1to Ct do begin
  2076. if j=1then begin
  2077. if op='o'then begin k3:=0;
  2078. if i=D0[1]then k3:=SLf[D0[1],D0[2]];
  2079. if i=D0[2]then k3:=SLf[D0[2],D0[1]];
  2080. if k3=0then Write(' ')else
  2081. if k3>0then if k3>9then
  2082. Write(k3,' ')else Write(k3,' ')end;
  2083. if op='p'then if Bo[i]>9then
  2084. Write(Bo[i],' ')else Write(Bo[i],' ');
  2085. Write(Rn[i],' ');
  2086. if op='p'then Write(' ')else
  2087. if op='o'then if FSi[i]='_'then
  2088. Write(' ')else Write(FSi[i],' ')end;
  2089. k3:=SLn[i,j];
  2090. if k3=0then Write(' ')else
  2091. if k3>0then if k3>9then Write(k3,' ')
  2092. else Write(k3,' ');
  2093. if j=Ct then Writeln end;
  2094. for i:=1to 41do Write('_');Writeln;
  2095.  
  2096. j:=0;if k>kL then k:=kL+1;
  2097. for i:=1to k-1do begin j:=j+1;
  2098. for k1:=1to 7do Write(DSt[i,k1]);
  2099. if i>99then jL:=3 else jL:=4;
  2100. Write(i,' ');if(j=jL)and(i<k-1)
  2101. then begin Writeln;j:=0 end end;
  2102. if kL>0then begin Writeln;
  2103. for i:=1to 41do Write('_');Writeln end;
  2104. Write(' ');
  2105. for i:=1to iL-1 do Write(Wh[i],' ');
  2106. Writeln;Write('0 ',St,' ');
  2107. Write('______________(',An,')');
  2108. Writeln('____________________');
  2109. Writeln(k2,' ',kL);
  2110. if Wn[1]=0then Writeln('66 66 ');
  2111. if Wn[1]>0then if Wn[1]=1then
  2112. Writeln(D0[1],' ',D0[2],' ')else
  2113. Writeln(D0[2],' ',D0[1],' ');
  2114. Write('99 ',Yr-2020,Db[3]);
  2115. if Mt>9then Write(Mt)else Write('0',Mt);
  2116. if Dy>9then Write(Dy)else Write('0',Dy);
  2117. Write(Db[4]);
  2118. Writeln(' ',D0[1],' ',D0[2]
  2119. ,' ',D0[2],' ',D0[1],' '){St>0}end;
  2120.  
  2121. Sj:=0;for i:=1to 19do Write('_');
  2122. Writeln(I8[zr]);Write(oEo,Xx,oa,' ');
  2123. if Wn[1]=0then Write('?');for i:=1
  2124. to Cw-1 do Write(Wn[i],' ');Writeln;
  2125. Writeln('__________________',oE,
  2126. '____________________');
  2127. k:=0;for i:=1 to Ct do begin k:=k+1;
  2128. if Rn[i]>9then Write(' ',Rn[i],' ')else
  2129. Write(' ',Rn[i],' ');if(k=10)and(i<Ct)
  2130. then begin Writeln;k:=0 end end;Writeln;
  2131. for i:=1to 41do Write('_');Writeln;
  2132.  
  2133. k1:=1;k:=0;
  2134. if Ip='_'then rL:=zu else rL:=0;
  2135. for i:=0to rL do for j:=1to Ct do begin
  2136. if(i=1)and(j=1)then begin
  2137. for k2:=1to Ct do Write('_',
  2138. FSi[k2],'__');Writeln('_________');
  2139. if zu=1then goto Sk1 end;
  2140. k:=k+1;
  2141. if(Ap[i,j]>=0)and(Ap[i,j]<9.5)then
  2142. Write(' ',Ap[i,j]:0:0,' ');
  2143. if Ap[i,j]>=9.5then
  2144. Write(' ',Ap[i,j]:0:0,' ');
  2145. if(Ap[i,j]<0)and(Ap[i,j]>-9.5)
  2146. then Write(Ap[i,j]:0:0,' ');
  2147. if(Ap[i,j]<0)and(Ap[i,j]<=-9.5)
  2148. then Write(Ap[i,j]:0:0,' ');
  2149. if(j=Ct)or(k=10){and(j<Ct-1))}then
  2150. begin if j=Ct then Writeln(I5[i])
  2151. else Writeln;k1:=k1+1;k:=0 end end;
  2152. Sj:=Sj-k1;Writeln('____________',
  2153. '______',oE,'____________________');
  2154. k1:=1;k:=0;for i:=1to Ct do begin k:=k+1;
  2155. if Rp[0,i]=0then Write(' - ')else if
  2156. Rp[0,i]<0then Write(Rp[0,i]:0:0,' ')
  2157. else Write(' ',Rp[0,i]:0:0,' ');
  2158. if((k=10)and(Ct>10))then begin
  2159. Writeln;k1:=k1+1;k:=0 end end;Writeln;
  2160. for i:=1to 41do Write('_');Writeln;
  2161. if Yy='_'then Sj:=Sj-1;
  2162. for i:=1to Ct do Write(Lo[i],' ');
  2163. Writeln;for i:=1to Ct do
  2164. Write(Rn[i],' ');Writeln end; Sk1:
  2165.  
  2166. for i:=1to 20+Sj do Writeln End.
  2167.  
Success #stdin #stdout 0.76s 10804KB
stdin
o________________________________________
^ _________________________________ i 8
666 661 676 671 766 761 776 771  0
6	6
7	6
6	6
5 _______________________________________ 
_   - 07  _____________n___o_____r______e
D  _Hour  Dy  Mt  Year T_z . : _ S * 6
   06 07  16  12  2024 s-n o 7  -9
01 _____  0 - 0   99   _ . - .  00  00  0 
  T-0000                     .  --- --- .
_________________________________________
. . . . .   . . . . .       00/00
2 0 99 00:00 Rrrrrrrr_0  .1 3  5 2
       00:00 Rrrrrrrr_0   o
. . . . .   . . . . .       00/00
_________________________________________
            1 5 3 7 2 8 4 6 
0 9 ______________(6)____________________
99   12              . . . . .  . . . . . 
1 3  5 2 
99 4c1216d      
5 3  3 2  
5 3  7 6  2 4  2 1  5 7  7 4  8 2  2 8  
4 2  4 6  6 5  5 3  5 3  2 1  1 8  1 2  
0 4b1215d
stdout
_________________________________________
  __*(s)   67-(0607)   (16)   12   2024
 (120)d   0029(0500)  7(16)   12   2024
      F                 Wc    Fa    We

2    -   (6)
241216 Mm___<1_____1:_________________*0w
W F W F    666   e 40k_________________ab
e a c d  _______   ~                 
 :       A  v *g       c- e •g* i| k (A 
(1)      3  :  3                      d 
         13-2 -91     <3  5  3 <8  2  3 
E_4   7  3  8 <8  3 _________________ 7__
W     7  3 <7 -2 -2    2 <8  3  2  4  1 
     <8  2 -3 -2  2                   5
      *        |  *  
241216 Mm___>3_____3^__________ 0_____*0F
W F W F  ( 676 ) e 30^_________-2______ab
e a c d  _______   ~            j    
 :      ~K  x  c      •c  e  g (K  a  c 
(3)      0    -0                      j 
         32 6 -10     -0  4  3 <3  2  2 
E-3   2  3  4 <7  2 _________________<7 _
F     2  3  2 -1 -0    0  0  1  0 <7  1 
      1  2 -1 -1 -0                   2
      *        *     


        4   0  -3  -5  -1   2   3  -1  
________:_______^________________________
        3   4   1   2   6   1   2   1 
        2   5   5   2   1   2   1   2 
________1___5___3___7___2___8___4___6____
        1   2   3   4   5   6   7   8
1  1 :      2   1                   2   
   2    2           2               2   
   3 ^      2                           
   4        2               2           
   5        1   2               2       
   6                    2               
   7                2       2           
   8        2                           
_________________________________________
4c1216d1  4b1215d2  
_________________________________________
            1 5 3 7 2 8 4 6 
0 9 ______________(6)____________________
99   12
1 3  
99 4c1216d            3 1  1 3  
___________________*
7s:  2 
__________________ Mm____________________
 1   2   3   4   5   6   7   8  
_________________________________________
 4   0  -3  -5  -1   2   3  -1  
_:_______^_______________________________