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

2  (6)-2  zMar 8

241216 Mm___<5_____2:_________________*0w
W F W F    661   e 16k_________________ab
e a c d  _______                     
 :       A  v  g       c- e •g  i| k (A 
(2)      0     0       f                
         0 -0  0      <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               
      *  *     |     
241216 Mm___<4_____7^_________________*0E
W F W F  ( 776 ) e 41k_________________ab
e a c d  _______   ~                 
 :       C  x *i       e  g •i| k  a (C-
(7)      4  : -1                      j 
         4  54-4       3  4 -1 -5 -1  4 
W_3   4  4  3  0  0 _________________-2__
W     4  4  1 -3 -1    0  1  7  0 -3  1 
      3 <8 -3 -2  2                   2
      *        *     


        4   0  -3  -5  -1   2   3  -1  
____________:___________________^________
        3   4   1   2   6   1   2   1 
        2   5   5   2   1   2   1   2 
________1___5___3___7___2___8___4___6____
        1   2   3   4   5   6   7   8
   1        2   1                   2   
   2 :  2           2               2   
   3        2                           
   4        2               2           
   5        1   2               2       
   6                    2               
   7 ^              2       2           
   8        2                           
_________________________________________
4c1216d1  4b1215d2  
_________________________________________
            1 5 3 7 2 8 4 6 
0 9 ______________(6)____________________
99   12
2 7  
99 4c1216d        -2  7 2  2 7  
___________________*
7s:  2 
__________________ Mm____________________
 1   2   3   4   5   6   7   8  
_________________________________________
 4   0  -3  -5  -1   2   3  -1  
_____:___________________^_______________