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

2    -   (6)   
241110 Mm___>_____24______________ 1__*0M
W W E W    872   k-31e____________ 2___ij
e l c c  ______:                   i|
 :       A  v  f! i    h •f  d  k*(A  c-
(1)      4  :  0  2       e             
         18 41-27 86   5 <3 -0 <4  4 <9 
E-2  <9 <3  8  2  4 _____ 3______________
E    -2 -2  7  2  4   <3  2  0  2  2  0 
     -2  3 <7 <2 -3      <6            
         *  *  |     
241110 Mm___<4_____1__________________*0w
W W E W  o 666   e 40k_________________ij
e l c c  _______   ~                 
 :       A  v *g       c- e •g* i| k (A 
(2)      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
      *        |  *  
241110 Mm___<4_____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 -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
      *        |  *  
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 
(4)      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___<_____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___<7____19__________________*0E
W W E W    866   ______________________ij
e l c c  :______                     
 :    k  D  >  a       h  f (D  i| k •a 
(6)  -7  1  : -4                      d 
      2 -2  45-5       3  4 <9 -5 -7 -4 
F_4  <9  4  3  0  0 _________________-2__
F    <9  4  2 -3 -2    0 <5 -1  3  0 -6 
      3  2 -2 -2 -0                  -5
      *        |  *  
241110 Mm___<9____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___<_____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 
(8)   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___<9____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 
(9)      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               
      *     *  |     

_________________________________________
      0  11 11 0  0  4  8  0  8 
      0  2  2  0  0  1  2  0  2 
      2  2  2  8  1  2  3  1  3 
______j_____j_____e_____d__e__d__________
_________4__4________7__9_____9__________
      24 1  1  5  16 19 11 16 11 
      1  2  3  4  5  6  7  8  9  
24 1                             
1  2           2        9     9  
1  3           2        9     9  
5  4                             
16 5                             
19 6           6                 
11 7           9                 
16 8                             
11 9           9                 
_________^_______________________________
4c1121c1  4c1121b2  4c1110c3  4c1029c4  
4c1029b5  4b1028c6  4j1024d7  4l1014c8  
4d1006d9  
_________________________________________
99 4c1110c        (6)
2
1    24  1   5   16  19  11  16  11  
     4   4           7   9       9   
___________________*
7s:  2 
__________________ Mm____________________
 1   2   3   4   5   6   7   8   9  
_____^___________________________________
-2   4   4  -5   6   4   2   6   2  
_j_______j_______e_______d___e___d_______