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

1    -   (6)   
241110 Mm___<______2__________________*0w
W W E W  o 661   e 16k_________________ij
e l c c  _______                     
 :       A  v  g       c- e •g  i| k (A 
(1)      0     0       f                
         0 -0  1      <0  9 <0  0  4 <0 
E<0  <0 <0  12 0 <0 __<0 ________________
E    <0 <0  12-0 <0   <0 <0 <0  8 <0  0 
     <0  8 -0 -4 -4   <0               
      *  *     |     
241110 Mm___<______3__________________*0w
W W E W    662   e 10k_________________ij
e l c c  _______                     
 :       A  v  g       c- e •g  i| k*(A 
(4)      0     0          f             
         0 -0  0      <0  9 <0  0  6 <0 
E<0  <0 <0  15 0 <0 _____<0 _____________
E    <0 <0  15-0 <0    0 <0  0  8 <0  0 
     <0  10-0 -5 -5      <0            
         *  *  |     
241110 Mm___<_____16_____<3___________*0M
W W E W    786   ________ 1____________ij
e l c c  :______         _d*         
 :    c #L  v  g       e •g  i| b (L  j 
(5)   4 -1     5                      c-
     -3 -5 -57-3       4  5 -0 -3 -1 -2 
W_6   5  5  4  0  0 _________________ 4__
W     5  5 -1 -3  0    0  2  8  0 -2  2 
      3 <8 -3 -3  2                   1
      *        *     
241110 Mm___>_____27__________________*0E
W W E W    882   h 11b_________________ij
e l c c  :______                     
 :    e #J  v  d       h  f •d  b  l*(J 
(6)   12 4     3          e             
      7 -0  10-2       10 4  3  7  2  4 
E-27  3  4  29 4  2 _____ 12_____________
E     3  4  28 3 -15   4  2  2  3  2  2 
     <8  18<4 -10-9       8            
         *  *        
241110 Mm___<5____15__________________*0E
W W E W    772   e 5 k_________________ij
e l c c  :______                     
 :    l #C  x  i       e  g •i| k  a*(C-
(7)   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 <0  9 <0  0 <0 
     <0  11-0 -5 -5       0            
         *     |  *  
241110 Mm___<_____22______________ 6__*0M
W W E W    876   _________________-1___ij
e l c c  ______:                  _i|
 :       A  v  f! i*   h •f  d* k (A  c-
(8)     -0     13-1                   j 
        -1 -99-3  6    7  13 4 -4 -0  5 
F_16  9  13 7  0  0 _________________-2__
F     9  13-5 -4  0    0  5  1  0 -2  1 
      9  2 -7 -7  3                   7
      *        *     
241110 Mm___<_____13__________________*0E
W W E W    776   e 41k_________________ij
e l c c  _______   ~                 
 :      ~C  x *i       e  g •i| k  a (C-
(9)      4  : -1                      j 
         4  55-4       3  4 -1 -5 -1  4 
W_3   4  4  3  0  0 _________________-2__
W     4  4  1 -3 -1    0  1  7  0 -3  1 
      3 <8 -3 -2  2                   2
      *        *     
241110 Mm___<_____16_____<3___________*0M
W W E W    786   ________ 1____________ij
e l c c  :______         _d*         
 :    c #L  v  g       e •g  i| b (L  j 
10)   4 -1     5                      c-
     -3 -5 -57-3       4  5 -0 -3 -1 -2 
W_6   5  5  4  0  0 _________________ 4__
W     5  5 -1 -3  0    0  2  8  0 -2  2 
      3 <8 -3 -3  2                   1
      *        *     
241110 Mm___>______5___________ 0_____*0F
W W E W  o 671   e 7 ^_________-7______ij
e l c c  _______                j    
 :       K  x  c~     •c  e  g (K  a  c 
(1)      7  :  0       f                
         0  67 0      <0  9 <0  7 <0 <0 
E-5  <0 <0  15 0 <0 __<0 ________________
E    <0 <0  15-0 <0   <0 <0 <0 <0  0  0 
     <0  10-0 -5 -5   <0               
      *  *           
241110 Mm___>10___20__________________*0E
W W E W    861   ______________________ij
e l c c  :______                     
 :    k  D  >  a       h  f (D  i| k •a 
(2)   1  3     12      a                
     -3  6 -88-2       5  2  3  9 <7  12
w-17  3  2  5  9  21__ 9_________________
w    -6 -21 5  9  16   2  0  12 6  0  8 
     -9 -5  5  12-3   13               
            *  |  *  
241110 Mm___<11____1__________________*0w
W W E W    666   e 40k_________________ij
e l c c  _______   ~                 
 :       A  v *g       c- e •g* i| k (A 
(3)      3  :  3                      d 
         13-2 -87     <3  5  3 <8  2  3 
E_4   7  3  8 <8  3 _________________ 7__
W     7  3 <7 -2 -2    2 <8  3  2  4  1 
     <8  2 -3 -2  2                   5
      *        |  *  
241110 Mm___<______3__________________*0w
W W E W    662   e 10k_________________ij
e l c c  _______                     
 :       A  v  g       c- e •g  i| k*(A 
(4)      0     0          f             
         0 -0  0      <0  9 <0  0  6 <0 
E<0  <0 <0  15 0 <0 _____<0 _____________
E    <0 <0  15-0 <0    0 <0  0  8 <0  0 
     <0  10-0 -5 -5      <0            
         *  *  |     

_________________________________________
      1  4  5  6  7  8  9  10 1  2  3  4  
   1                                      
   4                                      
   5                                      
   6                                      
   7                             2        
   8                                      
   9                                      
   10                                     
   1                                      
   2                                      
   3                                      
   4                                      
_________________________________________
      1  4  5  6  7  8  9  10 1  2  3  4  
   1                                      
   4                                      
   5                                      
   6                                      
   7                             -        
   8                                      
   9                                      
   10                                     
   1                                      
   2     -                    -        -  
   3  -                                   
   4                                      
_________a__e______________e___________a_
__________________5______________10_11___
      2  3  16 27 15 22 13 16 5  20 1  3  
      1  4  5  6  7  8  9  10 1  2  3  4  
2  1                                      
3  4                                      
16 5                                      
27 6                                      
15 7                             6        
22 8                                      
13 9                                      
16 10                                     
5  1                                      
20 2     7                    7        7  
1  3  7                                   
3  4                                      
_________________________________________
241110c1  241029c2  241029b3  241028c4  
241024d5  241014c6  241006d7  
_________________________________________
99 241110c        (6)

 5  3  16 27 15 22 13 16 2  20 1  3  
___________________*
7s:  1 
__________________ Mm____________________
 1   4   5   6   7   8   9   10  1   2  
 3   4  
___________________:_____________________
 0   0   6  -27  16  16  3   6  -5  -17 
 4   0  
_____a___e___________________e___________
_____a___

11121 11122 11

_________________________________________
 7s 12: -12/-1  -12[6]-6  0.0  12/0
6)____ Mm____*_____:____________________.
-1  -2  -3  -4  -5  -6  -7  -8  -9  -10 
-11 -12 
_________________________________________