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

_________________________________________
      1  4  5  6  7  8  9  10 1  2  3  4  
   1                                      
   4  1                                   
   5                                      
   6                             1        
   7        1              1              
   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        -     -        -        -     
____________e______________e___________________9__10____1__6____________________11
      8  20 2  17 11 22 3  2  25 5  18 1  
      1  4  5  6  7  8  9  10 1  2  3  4  
8  1                             7        
20 4  7        7        7        7        
2  5                                      
17 6                             1        
11 7     7  7              7  7  7        
22 8                                      
3  9                                      
2  10                                     
25 1                                      
5  2                                      
18 3                                      
1  4        7     7        7        7     
_________________________________________
241110c1  241029c2  241029b3  241028c4  
241024d5  241014c6  241006d7  
_________________________________________
99 241110c        (6)

 25 20 2  17 11 22 3  2  8  5  18 1  
___________________*
7s:  1 
__________________ Mm____________________
 1   4   5   6   7   8   9   10  1   2  
 3   4  
___________________:_____________________
 3  -17  0  -2   2   16  0   0  -14 -5  
 5   4  
_________e___________________e___________
_________

12121 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 
_________________________________________