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

o    (6)   
241029 Mm___>1________________________*0M
W W F M  . 781 . ________-0____________kl
e k c c  _______         _d          
 :      ~L  v  g       e •g  i| b (L  j*
(2)      6     2       d                
         11 40 23      2  2  2 -0  6 <3 
w-2   2  2  2  3  6 __ 2_________________
w    <9  1 <7  1  6   -1 -2 <4  3 -0   
      *     *        
241029 Mm___<5________________________*0E
W W F M  . 772 . e 5 k_________________kl
e k c c  :______                     
 :    l !C  x  i       e  g •i| k  a*(C-
(4)   0  0  :  0          l             
      0  2  0 -0       9 <0  0  7 <0 <0 
E_16 <0 <0  16 0 <0 _____<0 _____________
E    <0 <0  16-0 <0   <0  11-0 -5 -5   
         *     |  *  
241029 Mm___>_________________________*0M
W W F M  . 871 . _________________ 8___kl
e k c c  ______:                   i|
 :       A  v  f! i    h •f  d  k (A  c-
(7)      10    2  8    a                
         5  83 0  6    5  2 <8  1  10<1 
w-10 <9  2  7  8  13__ 3_________________
M    -6 -13 7  8  5   -6 -0  4  6 -4   
            *  |  *  
241029 Mm___>_________________________*0F
W W F M  . 671 . e 7 ^_________-6______kl
e k c c  _______                j    
 :       K  x  c      •c  e  g (K  a  c 
(5)      6  :  0       f                
         0  65 0      <0  9 <0  6 <0 <0 
E-5  <0 <0  15 0 <0 __<0 ________________
E    <0 <0  15-0 <0   <0  10-0 -5 -5   
      *  *           
241029 Mm___>4________________________*0M
W W F M  . 766 . : 48k___ 1____________kl
e k c c  _______   ~      d          
 :       I  >  e      •e  g* i|(I| k  a 
(8)      0  :  9                      d 
        -4 -88 3       9  5  1 <2  3  3 
E-1   11 5  12 1  3 _________________ 10_
W     11 5  2 -3 -3    2  3 -4 -3  3   
      *        |  *  
241029 Mm___<2________________________*0w
W W F M  . 682 . ______________________kl
e k c c  ______:                     
 :       G  v  j# e    c  e (G  b  l*•j 
(1)     -3     4  4       f             
        -20-73 10-28   2  4 -3  5  3  4 
E_4   2  3  9  4  3 _____ 3______________
E     2  3  8  2 -11  -0  4 <8 -2 -3   
         *  *        
241029 Mm___>4________________________*0M
W W F M  . 766 . : 48k___ 1____________kl
e k c c  _______   ~      d          
 :       I  >  e      •e  g* i|(I| k  a 
(3)      0  :  9                      d 
        -4 -88 3       9  5  1 <2  3  3 
E-1   11 5  12 1  3 _________________ 10_
W     11 5  2 -3 -3    2  3 -4 -3  3   
      *        |  *  
241029 Mm___>_________________________*0M
W W F M  . 871 . _________________ 8___kl
e k c c  ______:                   i|
 :       A  v  f! i    h •f  d  k (A  c-
(9)      10    2  8    a                
         5  83 0  6    5  2 <8  1  10<1 
w-10 <9  2  7  8  13__ 3_________________
M    -6 -13 7  8  5   -6 -0  4  6 -4   
            *  |  *  

_________________________________________
      2  4  7  5  8  1  3  9  
   2        1  1  1     1  1  
   4                          
   7                          
   5                          
   8                          
   1                          
   3                          
   9                          
_________________________________________
      2  4  7  5  8  1  3  9  
   2     -  -  -  -  -  -  -  
   4  -                       
   7                          
   5                          
   8           -              
   1        -              -  
   3           -              
   9                          
____________e_____f_____f__e_____________
______1__5________4__2__4________________
      2  4  7  5  8  1  3  9  
   2     1  1  1  1  1  1  1  
   4  6                       
   7                          
   5                          
   8           5              
   1        2              2  
   3           5              
   9                          
_________________________________________
241110c1  241029c2  241029b3  241028c4  
241024d5  241014c6  241006d7  
_________________________________________
99 241029c        (6)

781  772 871 671 766 682 766 871 
___________________*
7s:  ?
__________________ Mm____________________
 2   4   7   5   8   1   3   9  
___________________:_____________________
-2   16 -10 -5  -1   4  -1  -10 
_________e_______f_______f___e___

21222 122

_________________________________________
 7s 0: -1/-1  -1[6]5  0.0  0/0
6)____ Mm____*_____:____________________.

_________________________________________