Sub Main()
Dim ru(1),nu(21),rt(21),rt1(21),fr(21),fr1(21),fre(21),st(21)
w=4 'sorte
If w=5 Then ini=9532
If w=4 Then ini=10056
If w=3 Then ini=10075
If w=1 Then ini=EstrazioneFin-10
For es=ini To EstrazioneFin-1
co=co+1
r=11
ru(1)=r
nu(1) = Array(0,83,73,74,38,2,55,5,50,65,1,11,58,68,29,18,37,61,80,28,84,8,35)
nu(2) = Array(0,83,73,74,38,2,55,5,50,65,10,23,13,56,86,16,39,60,46,82,6,51,35)
nu(3) = Array(0,83,74,38,2,55,50,65,10,23,33,58,86,29,16,39,81,62,28,64,6,71,15)
nu(4) = Array(0,83,73,74,38,2,5,65,12,23,11,76,88,49,36,19,61,60,46,64,26,51,35)
nu(5) = Array(0,83,73,38,2,55,5,65,14,1,13,76,66,49,16,39,81,80,28,82,6,53,35)
nu(6) = Array(0,83,73,74,38,2,55,50,65,30,1,31,56,86,47,16,37,80,48,64,6,51,17)
nu(7) = Array(0,83,73,74,38,2,55,5,65,32,1,11,56,68,29,18,19,63,60,28,64,6,35)
nu(8) = Array(0,83,73,74,38,2,55,5,67,12,1,33,58,66,47,16,37,61,62,48,6,53,17)
nu(9) = Array(0,83,73,74,38,55,5,67,12,43,13,76,88,29,16,19,63,80,28,82,6,53,35)
nu(10) = Array(0,83,73,74,38,2,55,5,67,30,43,13,66,47,16,39,61,60,48,64,8,71,15)
nu(11) = Array(0,83,73,74,38,2,55,5,69,10,3,13,56,86,47,16,37,61,62,84,8,71,17)
nu(12) = Array(0,83,73,74,38,55,5,69,12,1,13,76,86,29,36,37,61,80,48,82,6,71,17)
nu(13) = Array(0,83,73,74,38,55,50,69,12,3,13,76,68,47,36,37,63,80,48,82,6,71,17)
nu(14) = Array(0,83,73,38,2,55,5,69,14,1,13,76,66,49,16,39,81,80,28,82,6,53,35)
nu(15) = Array(0,83,73,74,38,2,5,69,30,21,11,58,88,49,36,39,81,60,46,64,8,51,15)
nu(16) = Array(0,73,74,38,2,55,50,69,30,23,13,76,68,29,36,19,61,62,48,84,26,71,15)
nu(17) = Array(0,83,73,74,2,55,5,50,69,30,23,33,56,88,47,16,37,62,48,64,26,53,17)
nu(18) = Array(0,83,73,74,2,55,5,50,69,32,3,31,58,86,47,16,39,62,48,84,6,71,35)
nu(19) = Array(0,83,73,74,38,2,55,5,50,69,32,23,78,88,49,37,61,60,46,64,26,51,15)
nu(20) = Array(0,83,73,74,38,5,50,69,32,23,33,56,86,49,18,39,61,62,46,64,26,71,17)
nu(21) = Array(0,83,73,74,2,55,5,50,85,10,1,11,58,29,36,37,61,80,28,82,8,51,15)
For c=1 To 21
OrdinaMatrice nu(c),1
If SerieFreq(es,es,nu(c),ru,w)>0 Then
If SerieFreq(es+1,EstrazioneFin-1,nu(c),ru,w)=0 Then
cc=cc+1
rt(c)=EstrazioneFin-es
st(c)=SerieStorico(7440,EstrazioneFin-1,nu(c),ru,w)
rt1(c)=SerieRitardo(7440,EstrazioneFin -rt(c)-1,nu(c),ru,w)
fre(c)=SerieFreq(1,EstrazioneFin -1,nu(c),ru,w)
Scrivi FormatSpace(cc,4,1)&") "& DataEstrazione (es)&") "&FormatSpace(es,5,1)&") "&SiglaRuota(r)&" "&FormatSpace(StringaNumeri(nu(c)),8,1)_
&" fr "&FormatSpace(fre(c),4,1)&" st "&FormatSpace(st(c),4,1)&" rt pr "&FormatSpace(rt1(c),4,4)&" rt "&FormatSpace(rt(c),4,1)&" ",0,0'&" cl "&FormatSpace(co,4,1)
co=0
fr(c)=SerieFreq(EstrazioneFin,EstrazioneFin,nu(c),ru,w)
If fr(c)>0 Then fre1=fre1+fr(c): ColoreTesto 2: Scrivi " sortiti "&fr(c) Else Scrivi
'For ex=1 To EstrazioneFin-1
'If SerieFreq(ex,ex,nu(c),ru,w)>0 Then
'rtx(c)=SerieRitardo(1,ex-1,nu(c),ru,w)
'OrdinaMatrice rtx(c)
'ColoreTesto 1
'Scrivi " "&FormatSpace(rtx(c),3,1)&"",0,0
'End If
'Next
ColoreTesto 0
End If
End If
Next
Next
If fre1>0 Then Scrivi " sortiti "& fre1
If fre1=0 Then Scrivi " sortiti 0"
End Sub