⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1.txt

📁 一些关于乐透彩票的基本算法,后面的程序都是用VB编的
💻 TXT
字号:
香港六合彩的缩水软件算法没有看见过,以下是转载以前一位csdner:kestrelmoon   (Noone)   兄的一些关于乐透彩票的基本算法,我自己也没有时间看,只是下载了。。或者可以参考一下:
============================
我收集了些乐透彩票的基本算法,有兴趣的朋友可以来看看,讨论一下!没有这方面兴趣的朋友,我想也可以看看的,这里面有许多的算法真得很实用。
    后面的程序都是用VB编的,同大家都用这VB吧!
    程序请按规范格式写,通用性强,有良好的建议!
    有几个问题请大家帮忙:
    1、旋转矩阵的通用算法、程序;
    2、过滤的快速算法、程序;
    3、你所想到应该注意的东西!
  ........................
下面给出我现在有的程序:
供大家使用。
注意这些只是娱乐,可不是真的使用呀。
否则风险自负!
随机产生若干不重复的数:
      Public   Static   Sub   rand()
Dim   count   As   Integer
Dim   intNum   As   Integer
Dim   num   As   Integer
num   =   30’所要的最大数字
For   k   =   1   To   7‘要的随机数的个数
count   =   count   +   1
Randomize
intNum   =   Int((num   *   Rnd)   +   1)
If   count   <>   1   Then
        For   i   =   1   To   count   -   1
                Do   Until   arrnum(i)   <>   intNum
                        If   arrnum(i)   =   intNum   Then
                                intNum   =   Int((num   *   Rnd)   +   1)
                                i   =   1
                        End   If
                Loop
        Next   i
End   If
arrnum(k)   =   intNum
If   count   =   7   Then
      count   =   0
      Exit   Sub
End   If
Next   k
End   Sub

三种常用的排序方法:
    Sub   BubbleSortNumbers(iArray   As   Variant)
Dim   lLoop1   As   Long
Dim   lLoop2   As   Long
Dim   lTemp   As   Long
        For   lLoop1   =   UBound(iArray)   To   LBound(iArray)   Step   -1
                For   lLoop2   =   LBound(iArray)   +   1   To   lLoop1
                        If   iArray(lLoop2   -   1)   >   iArray(lLoop2)   Then
                                lTemp   =   iArray(lLoop2   -   1)
                                iArray(lLoop2   -   1)   =   iArray(lLoop2)
                                iArray(lLoop2)   =   lTemp
                        End   If
                Next   lLoop2
        Next   lLoop1
End   Sub
Sub   SelectionSortNumbers(vArray   As   Variant)
Dim   lLoop1   As   Long
Dim   lLoop2   As   Long
Dim   lMin   As   Long
Dim   lTemp   As   Long
        For   lLoop1   =   LBound(vArray)   To   UBound(vArray)   -   1
                lMin   =   lLoop1
                For   lLoop2   =   lLoop1   +   1   To   UBound(vArray)
                        If   vArray(lLoop2)   <   vArray(lMin)   Then   lMin   =   lLoop2
                Next   lLoop2
                lTemp   =   vArray(lMin)
                vArray(lMin)   =   vArray(lLoop1)
                vArray(lLoop1)   =   lTemp
        Next   lLoop1
End   Sub
Sub   ShellSortNumbers(vArray   As   Variant)
Dim   lLoop1   As   Long
Dim   lHold   As   Long
Dim   lHValue   As   Long
Dim   lTemp   As   Long
        lHValue   =   LBound(vArray)
        Do
                lHValue   =   3   *   lHValue   +   1
        Loop   Until   lHValue   >   UBound(vArray)
        Do
                lHValue   =   lHValue   /   3
                For   lLoop1   =   lHValue   +   LBound(vArray)   To   UBound(vArray)
                        lTemp   =   vArray(lLoop1)
                        lHold   =   lLoop1
                        Do   While   vArray(lHold   -   lHValue)   >   lTemp
                                vArray(lHold)   =   vArray(lHold   -   lHValue)
                                lHold   =   lHold   -   lHValue
                                If   lHold   <   lHValue   Then   Exit   Do
                        Loop
                        vArray(lHold)   =   lTemp
                Next   lLoop1
        Loop   Until   lHValue   =   LBound(vArray)
End   Sub

分解成小组合:
  Sub   a(ByRef   theArray()   As   String,   ByVal   num   As   Long)
        Dim   pos()   As   Long
        Dim   i   As   Long
        Dim   tmp   As   String
        If   num   =   0   Then   Exit   Sub
        If   num   >   UBound(theArray)   Then   num   =   UBound(theArray)
        ReDim   pos(num   -   1)
        For   i   =   0   To   num   -   1
                pos(i)   =   i
        Next   i
                Do
                tmp   =   ""
                For   i   =   0   To   num   -   1
                        tmp   =   tmp   &   theArray(pos(i))
                Next   i
              Print   tmp
        Loop   While   Not   (b(pos(),   num   -   1,   UBound(theArray))   <   0)
End   Sub

Function   b(ByRef   thePosArray()   As   Long,   ByVal   currentPos   As   Long,   ByVal   max   As   Long)   As   Long
        Dim   i   As   Long
        b   =   currentPos
        If   currentPos   <   0   Then   Exit   Function
                thePosArray(currentPos)   =   thePosArray(currentPos)   +   1
        For   i   =   currentPos   +   1   To   UBound(thePosArray)
                thePosArray(i)   =   thePosArray(i   -   1)   +   1
        Next   i
        If   thePosArray(UBound(thePosArray))   >   max   Then
                b   =   b(thePosArray,   currentPos   -   1,   max)
        End   If
End   Function

Private   Sub   Command1_Click()
  Dim   x(8)   As   String
        Dim   xx
        Cls
        x(0)   =   "a"
        x(1)   =   "b"
        x(2)   =   "c"
        x(3)   =   "d"
        x(4)   =   "e"
        x(5)   =   "f"
        x(6)   =   "g"
        x(7)   =   "h"
        x(8)   =   "i"
        Call   a(x(),   6)
End   Sub

以下程序用以求数组的交、并、补:
  Function   n(Array1   As   Variant,   Array2   As   Variant)   As   Variant()
'交集
        Dim   ArrayN()   As   Variant
        Dim   i   As   Long,   j   As   Long
        Dim   count   As   Long
        ReDim   ArrayN(IIf(UBound(Array1)   >   UBound(Array2),   UBound(Array1),   UBound(Array2)))
        For   i   =   0   To   UBound(Array1)
                For   j   =   0   To   UBound(Array2)
                        If   Array1(i)   =   Array2(j)   Then
                                ArrayN(count)   =   Array1(i)
                                count   =   count   +   1
                                Exit   For
                        End   If
                Next   j
        Next   i
        
        If   count   >   0   Then
                ReDim   Preserve   ArrayN(count   -   1)
                n   =   ArrayN
        End   If
End   Function

Function   u(Array1   As   Variant,   Array2   As   Variant)   As   Variant()
'并集
        Dim   ArrayU()   As   Variant
        Dim   i   As   Long,   j   As   Long
        Dim   count   As   Long
        Dim   flag   As   Boolean
        
        ReDim   Preserve   ArrayU(UBound(Array1)   +   UBound(Array2)   +   1)
        For   i   =   0   To   UBound(Array1)
                ArrayU(i)   =   Array1(i)
        Next   i
        count   =   UBound(Array1)   +   1
        
        For   i   =   0   To   UBound(Array2)
                flag   =   False
                For   j   =   0   To   UBound(Array1)
                        If   Array2(i)   =   Array1(j)   Then
                                flag   =   True
                                Exit   For
                        End   If
                Next   j
                If   Not   flag   Then
                        ArrayU(count)   =   Array2(i)
                        count   =   count   +   1
                End   If
        Next   i
        
        ReDim   Preserve   ArrayU(count   -   1)
        u   =   ArrayU
End   Function

Function   s(ArrayAll   As   Variant,   ArraySub   As   Variant)   As   Variant()
'补集
        Dim   ArrayS()   As   Variant
        Dim   i   As   Long,   j   As   Long
        Dim   count   As   Long
        Dim   flag   As   Boolean
        
        If   UBound(ArrayAll)   -   UBound(ArraySub)   =   0   Then   Exit   Function
        ReDim   ArrayS(UBound(ArrayAll)   -   UBound(ArraySub)   -   1)
        
        For   i   =   0   To   UBound(ArrayAll)
                flag   =   False
                For   j   =   0   To   UBound(ArraySub)
                        If   ArrayAll(i)   =   ArraySub(j)   Then
                                flag   =   True
                                Exit   For
                        End   If
                Next   j
                If   Not   flag   Then
                        ArrayS(count)   =   ArrayAll(i)
                        count   =   count   +   1
                End   If
        Next   i
        
        s   =   ArrayS
End   Function

“支持”的话请回答问题和提意见,不要只写那两个字!
我开这个帖的目的只是为了破除那些对彩票软件迷信的人,我觉得现在许多象《足彩大赢家》《缩水大师》等软件这类软件就象算命先生的话,我们要破除这些,并且在这个过程中提高自己的水平!
  有同感吗?支持吗?请实际些!
  哪位可以给出“缩水”的程序(选N保M之类的程序)出来?!

旋转矩阵原理   :     
        在数学上一个复式投注单假设有n个三选,m个双选,其中n+m<=13,所有的投注单构成了一个集合C(n,m),C(n,m)共有3的n次方乘以2的m次方个元素,每一个元素可以表示成一个13位长的三重码,在组合数学中已经证明存在至少一个C(n,m)的子集K(n,m),每一个C(n,m)中的元素,都存在一个K(n,m)中的元素,他们之间仅有1位的差别,即所谓的汉明距离(Hamming     Distance)等于1。满足上述条件的最小子集K(n,m)称为问题的一个最优解     
        这是足彩的缩水原理
                  而乐透型的原理和这个相似,就是选出N个数组合成含有M个元素的组合,并且这种组合和要求的组合最多只相差一位。
              比如你选出10个数字,所需要选中6个数字全都在这10个数字中那么你可以选出一个子集里肯定含有若干个组合中有那6数字中的5个或者更多

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -