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

13    -   (6)   
241221 Mm___<_______________ 0________!0F
W F E F    611   e 20k______<0_________ab
e a h d  ______:             l*      
 :      ~G  >  c! l*  •c  e  g (G  i* k 
(1)      0  :  0  0    f                
         1  2  0  0   <1  9 <4 <3  0  3 
E_4  <1  1  12 0 <0 __<5 ________________
E    <1  1  12-2 <0   <0 <4 <1 <1  8 <1 
     <8  8 -0 -4 -4   <2               
      *  *           
241221 Mm___>_________________________!0E
W F E F    886   h-6 b_________________ab
e a h d  _______                     
 :      ~J  v *d       h- f •d* b| l (J 
(2)      0  :  0                      c 
        -1 -3  1       7  1 <3  10<1  0 
E-16 <6  1  16 0 <1 _________________<3 _
E    <6  1  16-0 <1    0 <4 <1 <9  0  4 
      1  11-1 -6 -5                  <1
      *     |  *     
241221 Mm___>____________<7___________!0M
W F E F    786   ________<9____________ab
e a h d  :______         _d*         
 :    c !L  v  g~      e •g  i* b|(L  j 
(3)   5  7     4                      c 
      27 17 22 18      3  4  3  2  7  3 
w-2   6  4  5  6  7 _________________ 5__
w     2  3  3  4  4    0  2  4  3  4  4 
     -1 -1 <7  1 <4                   2
      *     |  *     
241221 Mm___>5___________ 0___________!0M
W F E F    781   ________-1____________ab
e a h d  _______         _d          
 :       L  v  g~      e •g  i  b|(L  j*
(4)      7     1       d                
         5  58-28     -0  1  3 <6  7  3 
w-6   2  1 <6  5  7 __ 2_________________
w    -1 <0 <6  5  7   -0  2 <1 -0  2 <7 
     -3 -3  3  4 -1    3               
      *     *        
241221 Mm___<_________ 0_<2___________!0M
W F E F    712   e 7 k<0_<4____________ab
e a h d  _______       a* c          
 :      ~G  v *i       e (G  i* g •i* k 
(5)      1  :  0          l             
         4  8 -1       6 <8  0 <6  0  3 
E_2  <4  1  9  0 <1 _____<1 _____________
E    <4  1  9 -2 <1   <5 <4  9 <2  7 <3 
     <9  6 -1 -3 -3       0            
         *        *  
241221 Mm___>2________________________!0E
W F E F    771   e 47k_________________ab
e a h d  _______   ~                 
 :       C  x  i       e  g •i  k* a (C 
(6)      3     1       d                
         20 25 18      1 <7 <8 -3  2  3 
W-3   4 <7  1 <8  2 __<7 ________________
W     4 <2 -4 <7  2   -4  4 -1 -1  0  0 
     -1 -1 -1  1  2    5               
      *     *        
241221 Mm___<1________________________!0w
W F E F    662   e 9 k_________________ab
e a h d  _______                     
 :       A  v  g~      c  e •g  i  k*(A 
(7)      0     0          f             
         0 -2  1      <1  10<2  0  6 <0 
E<6  <1 <6  16 0 <0 _____<4 _____________
E    <1 <6  16-1 <0    0  1  0  7 <6  0 
     <4  11-0 -6 -5      <0            
         *  *        
241221 Mm___>_________________________!0E
W F E F    886   h-6 b_________________ab
e a h d  _______                     
 :      ~J  v *d       h- f •d* b| l (J 
(8)      0  :  0                      c 
        -1 -3  4       7  1 <3  10<1  0 
E-16 <6  1  16 0 <1 _________________<3 _
E    <6  1  16-0 <1    0 <4 <1 <9  0  4 
      1  11-1 -6 -5                  <1
      *     |  *     

_________e_________________e_____________
_______________5_____2__1________________
      1  2  3  4  5  6  7  8  
   1                          
   2                          
   3                          
   4                          
   5                          
   6                          
   7           1              
   8                          
_________________________________________
4c1121c1  4c1121b2  4c1110c3  4c1029c4  
4c1029b5  4b1028c6  4j1024d7  4l1014c8  
4d1006d9  
_________________________________________
99 4h1221d        (6)
0
611  886 786 781 712 771 662 886 
             5       2   1       
___________________!
7s:  13 
__________________ Mm____________________
 1   2   3   4   5   6   7   8  
_________________________________________
 4  -16 -2  -6   2  -3   1  -16 
_____e_______________________e___________

12221 212