Jump to content

Bruno Cintra

Membro
  • Posts

    327
  • Joined

  • Last visited

Everything posted by Bruno Cintra

  1. não entendi se cada zona esta com maximo 1,porque que aparece em algumas linhas dois numeros da zona
  2. sim,creio que a chance aumenta bastante,é claro que se fizer um fechamento com elas os trevos vai ter ser meio aleatorio ou jogar com todos trevos com as apostas de seis numeros a 90,00 reais ,ai seria bom para bolão.
  3. 01 02 03 04 05 06 07 08 09 10 11 12 15 16 17 18 19 20 27 28 31 32 33 34 35 36 37 38 43 44 01 02 03 04 05 06 07 08 09 10 11 12 15 16 19 20 21 22 27 28 29 30 37 38 39 40 41 42 45 46 01 02 03 04 05 06 07 08 09 10 11 12 17 18 19 20 25 26 29 30 35 36 39 40 41 42 43 44 47 48 01 02 03 04 05 06 07 08 09 10 11 12 23 24 25 26 29 30 31 32 35 36 39 40 41 42 45 46 49 50 01 02 03 04 05 06 07 08 09 10 13 14 15 16 21 22 25 26 27 28 29 30 33 34 35 36 37 38 39 40 01 02 03 04 05 06 07 08 09 10 13 14 17 18 19 20 21 22 23 24 25 26 41 42 43 44 45 46 49 50 01 02 03 04 05 06 07 08 09 10 13 14 17 18 25 26 27 28 31 32 37 38 41 42 43 44 45 46 47 48 01 02 03 04 05 06 07 08 09 10 15 16 19 20 21 22 25 26 31 32 33 34 35 36 41 42 45 46 47 48 01 02 03 04 05 06 07 08 09 10 15 16 23 24 27 28 33 34 35 36 37 38 41 42 45 46 47 48 49 50 01 02 03 04 05 06 07 08 11 12 13 14 15 16 17 18 25 26 27 28 29 30 35 36 39 40 47 48 49 50 01 02 03 04 05 06 07 08 11 12 13 14 15 16 23 24 25 26 27 28 31 32 35 36 37 38 43 44 47 48 01 02 03 04 05 06 07 08 11 12 13 14 23 24 27 28 29 30 31 32 33 34 35 36 39 40 41 42 43 44 01 02 03 04 05 06 07 08 13 14 17 18 19 20 27 28 29 30 33 34 39 40 41 42 45 46 47 48 49 50 01 02 03 04 05 06 07 08 15 16 17 18 25 26 31 32 33 34 37 38 39 40 41 42 43 44 47 48 49 50 01 02 03 04 05 06 09 10 11 12 13 14 15 16 17 18 21 22 23 24 27 28 35 36 41 42 45 46 49 50 01 02 03 04 05 06 09 10 11 12 13 14 19 20 21 22 25 26 29 30 33 34 37 38 39 40 43 44 49 50 01 02 03 04 05 06 09 10 11 12 21 22 25 26 27 28 31 32 33 34 41 42 43 44 45 46 47 48 49 50 01 02 03 04 05 06 11 12 13 14 17 18 19 20 21 22 23 24 25 26 27 28 33 34 43 44 47 48 49 50 01 02 03 04 05 06 11 12 15 16 17 18 19 20 21 22 23 24 29 30 31 32 35 36 37 38 39 40 47 48 01 02 03 04 05 06 13 14 15 16 19 20 21 22 27 28 31 32 33 34 35 36 37 38 43 44 47 48 49 50 01 02 03 04 05 06 15 16 21 22 23 24 25 26 29 30 35 36 37 38 39 40 41 42 43 44 45 46 49 50 01 02 03 04 07 08 09 10 11 12 13 14 15 16 17 18 29 30 33 34 35 36 39 40 41 42 45 46 47 48 01 02 03 04 07 08 09 10 11 12 13 14 19 20 25 26 33 34 35 36 39 40 41 42 43 44 45 46 49 50 01 02 03 04 07 08 11 12 13 14 15 16 17 18 25 26 29 30 31 32 35 36 37 38 39 40 43 44 49 50 01 02 03 04 07 08 11 12 13 14 15 16 19 20 21 22 25 26 33 34 35 36 37 38 41 42 45 46 49 50 01 02 03 04 07 08 11 12 13 14 17 18 19 20 21 22 23 24 25 26 31 32 33 34 37 38 43 44 47 48 01 02 03 04 07 08 11 12 15 16 17 18 19 20 25 26 27 28 35 36 41 42 43 44 45 46 47 48 49 50 01 02 03 04 07 08 11 12 17 18 19 20 29 30 31 32 33 34 37 38 39 40 41 42 43 44 45 46 49 50 01 02 03 04 07 08 13 14 15 16 17 18 19 20 21 22 23 24 27 28 29 30 35 36 39 40 43 44 49 50 01 02 03 04 07 08 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 37 38 39 40 47 48 49 50 01 02 03 04 09 10 11 12 13 14 15 16 19 20 23 24 31 32 33 34 35 36 41 42 43 44 45 46 49 50 01 02 03 04 09 10 11 12 15 16 21 22 25 26 29 30 31 32 33 34 35 36 39 40 43 44 47 48 49 50 01 02 03 04 09 10 11 12 17 18 19 20 21 22 23 24 27 28 31 32 37 38 41 42 45 46 47 48 49 50 01 02 03 04 09 10 13 14 15 16 17 18 19 20 21 22 33 34 35 36 37 38 39 40 43 44 45 46 47 48 01 02 03 04 09 10 13 14 15 16 19 20 21 22 23 24 25 26 27 28 29 30 35 36 41 42 47 48 49 50 01 02 03 04 09 10 13 14 19 20 21 22 25 26 29 30 31 32 39 40 41 42 43 44 45 46 47 48 49 50 01 02 03 04 09 10 13 14 23 24 25 26 27 28 29 30 37 38 39 40 41 42 43 44 45 46 47 48 49 50 01 02 03 04 09 10 15 16 17 18 19 20 21 22 23 24 25 26 29 30 33 34 35 36 39 40 41 42 45 46 01 02 03 04 09 10 15 16 17 18 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 45 46 49 50 01 02 05 06 07 08 09 10 11 12 13 14 15 16 17 18 29 30 33 34 35 36 41 42 43 44 45 46 47 48 01 02 05 06 07 08 09 10 11 12 13 14 15 16 17 18 33 34 35 36 39 40 41 42 43 44 45 46 47 48 01 02 05 06 07 08 09 10 11 12 13 14 19 20 21 22 23 24 25 26 27 28 31 32 37 38 47 48 49 50 01 02 05 06 07 08 09 10 11 12 15 16 17 18 21 22 23 24 25 26 31 32 33 34 35 36 43 44 49 50 01 02 05 06 07 08 09 10 13 14 15 16 17 18 19 20 23 24 29 30 31 32 33 34 35 36 39 40 49 50 01 02 05 06 07 08 09 10 17 18 21 22 23 24 27 28 29 30 31 32 37 38 39 40 43 44 47 48 49 50 01 02 05 06 07 08 11 12 13 14 19 20 23 24 27 28 31 32 33 34 37 38 41 42 43 44 45 46 47 48 01 02 05 06 09 10 11 12 13 14 15 16 17 18 19 20 25 26 31 32 35 36 37 38 41 42 45 46 49 50 01 02 05 06 13 14 17 18 21 22 23 24 25 26 29 30 31 32 33 34 37 38 39 40 41 42 45 46 47 48 01 02 05 06 15 16 19 20 23 24 25 26 27 28 29 30 31 32 35 36 39 40 41 42 43 44 45 46 49 50 01 02 07 08 09 10 11 12 13 14 17 18 23 24 25 26 31 32 33 34 35 36 39 40 45 46 47 48 49 50 01 02 07 08 11 12 13 14 15 16 19 20 23 24 25 26 29 30 35 36 37 38 39 40 41 42 45 46 47 48 01 02 07 08 11 12 13 14 15 16 21 22 27 28 29 30 31 32 35 36 39 40 41 42 45 46 47 48 49 50 01 02 07 08 11 12 17 18 21 22 23 24 25 26 27 28 29 30 33 34 39 40 41 42 43 44 45 46 49 50 01 02 07 08 13 14 15 16 17 18 21 22 23 24 31 32 35 36 37 38 41 42 43 44 45 46 47 48 49 50 01 02 09 10 11 12 13 14 15 16 19 20 21 22 25 26 27 28 33 34 35 36 37 38 41 42 43 44 45 46 01 02 09 10 11 12 13 14 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 37 38 39 40 49 50 01 02 09 10 11 12 15 16 19 20 23 24 27 28 29 30 33 34 35 36 37 38 39 40 43 44 47 48 49 50 01 02 09 10 13 14 15 16 17 18 21 22 23 24 25 26 27 28 31 32 33 34 35 36 37 38 47 48 49 50 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 23 24 27 28 37 38 39 40 41 42 43 44 03 04 05 06 07 08 09 10 11 12 13 14 15 16 21 22 23 24 25 26 29 30 41 42 43 44 47 48 49 50 03 04 05 06 07 08 09 10 11 12 17 18 21 22 23 24 29 30 31 32 33 34 35 36 39 40 41 42 47 48 03 04 05 06 07 08 09 10 13 14 15 16 19 20 25 26 27 28 29 30 33 34 37 38 43 44 45 46 49 50 03 04 05 06 07 08 09 10 13 14 17 18 23 24 25 26 27 28 33 34 35 36 37 38 39 40 43 44 45 46 03 04 05 06 07 08 11 12 13 14 15 16 17 18 21 22 25 26 27 28 31 32 33 34 39 40 41 42 45 46 03 04 05 06 07 08 11 12 13 14 19 20 29 30 31 32 35 36 37 38 39 40 41 42 43 44 45 46 47 48 03 04 05 06 07 08 11 12 13 14 21 22 23 24 25 26 27 28 35 36 39 40 43 44 45 46 47 48 49 50 03 04 05 06 07 08 11 12 15 16 17 18 19 20 21 22 23 24 25 26 33 34 37 38 39 40 45 46 49 50 03 04 05 06 07 08 11 12 19 20 21 22 23 24 25 26 29 30 31 32 35 36 37 38 41 42 43 44 49 50 03 04 05 06 07 08 13 14 15 16 17 18 21 22 23 24 29 30 31 32 33 34 37 38 43 44 45 46 49 50 03 04 05 06 07 08 15 16 19 20 21 22 23 24 27 28 29 30 33 34 39 40 41 42 43 44 47 48 49 50 03 04 05 06 07 08 17 18 19 20 23 24 27 28 29 30 31 32 33 34 35 36 39 40 45 46 47 48 49 50 03 04 05 06 07 08 17 18 21 22 23 24 25 26 29 30 31 32 33 34 35 36 37 38 39 40 45 46 47 48 03 04 05 06 09 10 11 12 13 14 15 16 17 18 21 22 25 26 29 30 31 32 39 40 41 42 43 44 49 50 03 04 05 06 09 10 11 12 13 14 15 16 17 18 23 24 29 30 31 32 33 34 39 40 43 44 45 46 47 48 03 04 05 06 09 10 11 12 13 14 19 20 21 22 23 24 27 28 29 30 31 32 33 34 35 36 37 38 45 46 03 04 05 06 09 10 11 12 19 20 25 26 27 28 31 32 33 34 35 36 37 38 39 40 41 42 47 48 49 50 03 04 05 06 09 10 13 14 17 18 19 20 23 24 25 26 29 30 31 32 33 34 35 36 41 42 43 44 47 48 03 04 05 06 09 10 13 14 17 18 21 22 27 28 29 30 33 34 35 36 37 38 41 42 43 44 47 48 49 50 03 04 05 06 09 10 15 16 17 18 21 22 23 24 25 26 27 28 29 30 31 32 33 34 37 38 41 42 43 44 03 04 05 06 11 12 13 14 17 18 19 20 23 24 25 26 29 30 33 34 35 36 37 38 43 44 45 46 49 50 03 04 07 08 09 10 11 12 13 14 15 16 19 20 27 28 29 30 31 32 37 38 41 42 43 44 47 48 49 50 03 04 07 08 09 10 11 12 15 16 17 18 19 20 23 24 31 32 39 40 41 42 43 44 45 46 47 48 49 50 03 04 07 08 09 10 11 12 15 16 19 20 21 22 23 24 25 26 27 28 31 32 37 38 39 40 43 44 45 46 03 04 07 08 09 10 11 12 17 18 19 20 23 24 25 26 27 28 29 30 33 34 35 36 37 38 41 42 49 50 03 04 07 08 09 10 11 12 25 26 27 28 29 30 31 32 33 34 35 36 37 38 43 44 45 46 47 48 49 50 03 04 07 08 09 10 13 14 21 22 23 24 27 28 31 32 33 34 35 36 37 38 39 40 41 42 43 44 49 50 03 04 07 08 09 10 15 16 17 18 21 22 25 26 27 28 33 34 37 38 39 40 41 42 43 44 47 48 49 50 03 04 09 10 11 12 13 14 17 18 21 22 25 26 27 28 29 30 31 32 33 34 35 36 43 44 45 46 49 50 03 04 11 12 15 16 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 37 38 45 46 47 48 49 50 03 04 13 14 15 16 17 18 19 20 23 24 25 26 27 28 31 32 33 34 39 40 43 44 45 46 47 48 49 50 05 06 07 08 11 12 13 14 15 16 17 18 19 20 21 22 27 28 29 30 31 32 33 34 37 38 41 42 47 48 05 06 07 08 11 12 13 14 15 16 17 18 23 24 25 26 27 28 29 30 31 32 33 34 41 42 47 48 49 50 05 06 07 08 13 14 17 18 19 20 21 22 23 24 25 26 27 28 31 32 35 36 37 38 39 40 41 42 49 50 05 06 09 10 11 12 15 16 17 18 19 20 21 22 25 26 27 28 29 30 37 38 43 44 45 46 47 48 49 50 05 06 09 10 13 14 15 16 19 20 21 22 23 24 25 26 27 28 31 32 37 38 39 40 45 46 47 48 49 50 05 06 09 10 17 18 19 20 21 22 27 28 29 30 31 32 33 34 35 36 39 40 41 42 43 44 45 46 49 50 07 08 09 10 11 12 13 14 17 18 19 20 21 22 27 28 33 34 35 36 37 38 39 40 45 46 47 48 49 50 07 08 09 10 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 37 38 45 46 49 50 07 08 09 10 13 14 15 16 19 20 21 22 23 24 29 30 33 34 35 36 39 40 43 44 45 46 47 48 49 50 11 12 13 14 15 16 17 18 19 20 21 22 23 24 29 30 31 32 33 34 37 38 39 40 41 42 43 44 49 50 11 12 17 18 19 20 21 22 23 24 25 26 27 28 31 32 35 36 37 38 39 40 41 42 43 44 47 48 49 50 e apenas uma delas que não ainda não saiu 6 pontos 03 04 05 06 07 08 09 10 13 14 17 18 23 24 25 26 27 28 33 34 35 36 37 38 39 40 43 44 45 46
  4. inclusive tenho Lottodesigner em C++ builder com interface grafica e o lottotricks que ja até passei para alguns aqui no site que o é codigo cover32 do nurmela em vb6 mais uma boa parte desses um amigo que converteu o programa,mais tenho bastante noção,eu estou tentando passar um de python para delphi ou c que gera reduzido que da quase a quantia que tem do site la jolla
  5. eu entendo pouco de cada,mais não de começar do zero e fazer um programa completo,rsrsrs mais sei um pouco de vba ou vb6,c,delphi,python,c++ builder que é praticamente o c com interface grafica.mais é só por hobby
  6. Version 1.0.0

    37 downloads

    Para quem quer filtrar,esta garantindo quina garantida se acertar 5.
  7. no programa que eu tenho com 10 linhas de 10 dezenas,eu consigo 2=100% 3=100% 4=100% 5=99,994126 05 09 11 15 17 18 21 22 23 24 03 10 11 12 14 16 17 18 21 25 01 02 06 07 13 15 18 19 20 25 04 06 10 15 16 17 19 20 21 22 01 08 10 11 12 13 19 20 23 25 03 05 06 08 09 12 14 16 23 24 01 02 03 08 12 13 15 17 21 22 02 04 06 07 08 11 12 14 18 23 05 07 08 09 16 19 20 22 24 25 01 02 03 04 05 07 09 13 14 24
  8. #import numpy as np import random as rd lista_quant_numeros_linha = [] lista_index_numeros_linha =[] lista_auxiliar_sequencia_coluna = [] lista_verif_colunas = [] bilhete_premiado = [] sequencia_coluna=[] i = 0 acumulador = 0 linha = 0 coluna = 0 def geradorIndices(quant_numeros_linha): flag = True while(flag): index_numeros_linha = rd.sample(range(0, 10), quant_numeros_linha) index_numeros_linha.sort() for i in range(len(index_numeros_linha) - 3): if index_numeros_linha[i] + 1 == index_numeros_linha[i + 1] == index_numeros_linha[i + 2] - 1 == index_numeros_linha[i + 3] - 2: break else: return index_numeros_linha def geradoraleatorio(): lista = [] ac = 0 for x in range(10): aux = rd.randint(5, 5) ac += aux lista.append(aux) return lista, ac def gerarListaIndices(lista_quant_numeros_linha): lista_index_numeros_linha = [] for i in range(len(lista_quant_numeros_linha)): index_numeros_linha = geradorIndices(lista_quant_numeros_linha[i]) index_numeros_linha.sort() lista_index_numeros_linha.append(index_numeros_linha) return lista_index_numeros_linha def verificacaoColunaQuant(lista_index_numeros_linha): for i in range(10): quant_sum = sum(x.count(i) for x in lista_index_numeros_linha) if(quant_sum > 6): return True return False def gerarListaVerificadas(lista_quant_numeros_linha): flag = True while(flag): lista_index_numeros_linha = gerarListaIndices(lista_quant_numeros_linha) flag = verificacaoColunaQuant(lista_index_numeros_linha) return lista_index_numeros_linha def verificarSeqColuna(sequencia_coluna, lista_quant_numeros_linha): numero = 0 lista_final = [] lista_final = gerarListaVerificadas(lista_quant_numeros_linha) while(testadorSimples(lista_final)): lista_final = gerarListaVerificadas(lista_quant_numeros_linha) return lista_final def testadorSimples(lista): cont = 0 for numero in range(1,10): for x in lista: if numero in x: cont += 1 else: cont = 0 if cont > 3: return True return False def geradorDeDinheiro(): lista_quant_numeros_linha = [] lista_index_numeros_linha =[] lista_auxiliar_sequencia_coluna = [] lista_verif_colunas = [] bilhete_premiado = [] sequencia_coluna=[] i = 0 acumulador = 0 linha = 0 coluna = 0 lista_quant_numeros_linha, acumulador = geradoraleatorio() while(acumulador > 50): lista_quant_numeros_linha, acumulador = geradoraleatorio() quant_numeros_totais_faltando = 50 - acumulador; while(quant_numeros_totais_faltando > 0): i = rd.randint(0, (len(lista_quant_numeros_linha)-1)) if(lista_quant_numeros_linha[i] < 5 and quant_numeros_totais_faltando > 0): lista_quant_numeros_linha[i] = lista_quant_numeros_linha[i] + 1 quant_numeros_totais_faltando = quant_numeros_totais_faltando - 1 lista_verif_colunas = [] lista_index_numeros_linha = gerarListaVerificadas(lista_quant_numeros_linha) quant = 0 for i in range(10): quant = sum(x.count(i) for x in lista_index_numeros_linha) lista_verif_colunas.append(quant) for x in range(10): for y in range(10): try: sequencia_coluna.append(lista_index_numeros_linha[y][x]) except Exception as e: pass lista_index_numeros_linha = verificarSeqColuna(sequencia_coluna, lista_quant_numeros_linha) for i in lista_index_numeros_linha: for x in i: if(linha > 0): aux = 1 + x + (linha * 10) bilhete_premiado.append(aux) else: aux = x + linha + 1 bilhete_premiado.append(aux) linha += 1 try: with open(nome_arquivo + ".txt") as file: for line in file: if(((str(bilhete_premiado)) + "\n") == line): lista_index_numeros_linha = geradorDeDinheiro() except Exception as e: pass return lista_index_numeros_linha quant_bilhetes = input("Digite a quantidade de bilhetes: ") nome_arquivo = input("Digite o nome do arquivo: ") for quant_bilhe in range(int(quant_bilhetes)): lista_quant_numeros_linha = [] lista_index_numeros_linha =[] lista_auxiliar_sequencia_coluna = [] lista_verif_colunas = [] bilhete_premiado = [] sequencia_coluna=[] i = 0 acumulador = 0 linha = 0 coluna = 0 lista_index_numeros_linha = geradorDeDinheiro() for i in lista_index_numeros_linha: for x in i: if(linha > 0): aux = 1 + x + (linha * 10) bilhete_premiado.append(aux) else: aux = x + linha + 1 bilhete_premiado.append(aux) linha += 1 bilhete_premiado.sort() arquivo = open(nome_arquivo + ".txt", "a") print(quant_bilhe+1,end="\r") #arquivo.write("BILHETE " + str(quant_bilhe+1) + "\n") arquivo.write(' '.join([str(f"{item:02}") for item in bilhete_premiado]) + "\n") arquivo.close() print("BILHETE GERADO COM SUCESSO!!!") print("BOA SORTE") esta ai um codigo em python para lotomania Gera um bilhete de 50 numeros com base nos seguintes filtros: - Na linha de 5 a 5 numeros, com no maximo 3 seguidos. - Na coluna de 5 a 5 numeros, com no maximo 3 seguidos. - 50 numeros de 100. e um site online para rodar Online Python Compiler - online editor (onlinegdb.com)
  9. sim,eu estou mexendo em dois codigo de fonte um pra lotomania e outro que faz fechamneto v,k,t,m ja reduzido em python, tentando converter para C que acho vai ficar mais rapido,e sempre dou uma olhada para ver.
  10. Version 1.0.0

    10 downloads

    jogo fechado 100%
  11. eu postei aqui no forum ve se consegue rodar
  12. Version 1.0.0

    39 downloads

    Programa faz fechamento 100% v,k,t,m até 32 numeros,com garantia maior que k. ve se esta salvando as combinações na mesma pasta que extraiu o arquivo comb.txt. se colocar Iterações altas demora mais,só que mais reduzido.
  13. estou fazendo uns ajustes aqui,eu vou colocar o arquivo aqui,por enquanto esta rodando em msdos console,estou tentando passar para interface grafica.
  14. vou colocar aqui parar rodar e ver a quantidade que vai dar.
  15. fala blz,vc manja bem de codigo c,c++ eu estou tentando modificar um codigo que não consegui fazer ,de gerar combinações C(N,K) mais não sequencial eu precisava que seja aleatorio,o codigo que tenho aqui até faz aleatorio mais com loop infinito,qualquer coisa te envio o codigo inteiro que faz combinações v,k,t,m=b igual o cologa.
  16. um codigo em assembler do programa oscover que gerar v,k,t,m=b .386 .model flat, stdcall option casemap :none ; case sensitive ; ######################################################################### include \masm32\include\windows.inc include \masm32\include\user32.inc include \masm32\include\kernel32.inc includelib \masm32\lib\user32.lib includelib \masm32\lib\kernel32.lib combinations PROTO :DWORD,:DWORD ; ######################################################################### szText MACRO Name, Text:VARARG LOCAL lbl jmp lbl Name db Text,0 lbl: ENDM m2m MACRO M1, M2 push M2 pop M1 ENDM return MACRO arg mov eax, arg ret ENDM .code ; ########################################################################## LibMain proc hInstDLL:DWORD, reason:DWORD, unused:DWORD szText LmTitle,"Cover Functions" .if reason == DLL_PROCESS_ATTACH szText ATTACHPROCESS,"PROCESS_ATTACH" return TRUE ; ----------------------------- ; If error at startup, return 0 ; System will abort loading DLL ; ----------------------------- .elseif reason == DLL_PROCESS_DETACH szText DETACHPROCESS,"PROCESS_DETACH" .elseif reason == DLL_THREAD_ATTACH szText ATTACHTHREAD,"THREAD_ATTACH" .elseif reason == DLL_THREAD_DETACH szText DETACHTHREAD,"THREAD_DETACH" .endif ret LibMain Endp ; ########################################################################## ; *** Count the number of bits in DWORD bitCount proc STDCALL number:DWORD sub eax,eax mov ecx,number cmp eax,ecx je noBits bitLp: inc eax mov ebx,ecx dec ebx and ecx,ebx jne bitLp noBits: ret bitCount endp ; *** Count combinations of subsets in full set n!/k!(n-k)! combinations proc STDCALL subSet:DWORD,fullSet:DWORD sub edx,edx push edx mov eax,subSet bts edx,eax dec edx nextLp: sub ecx,ecx mov ebx,edx bitLp: inc ecx mov eax,ebx dec eax and ebx,eax jnz bitLp cmp ecx,subSet jne badCount inc DWORD PTR [esp] mov eax,edx dec eax or edx,eax badCount: inc edx mov eax,fullSet bt edx,eax jnc nextLp pop eax ret combinations endp ; *** Count how many cover sets are contained within a list of source sets ; *** ignore sets with MSb on checkCover proc STDCALL cover:DWORD,subSet:DWORD,fullSet:DWORD,setList:DWORD push edi push esi sub edx,edx push edx mov eax,subSet bts edx,eax dec edx mov esi,setList lea edi,subSet nextTestSet: sub ebx,ebx add ebx,edx jz badCount sub ecx,ecx bitLp: inc cx mov eax,ebx dec eax and ebx,eax jnz bitLp cmp cx,[edi] jge isGoodCnt badCount: bt ecx,16 jc isBadCover nextComb: inc edx mov ebx,fullSet bt edx,ebx jnc nextTestSet jmp finished isGoodCnt: bts ecx,16 jc isCoverTest jne nextComb isBadCover: lea edi,cover testSetLp: add ebx,[esi] jz endTestSet add esi,4 bt ebx,31 jnc notFlagged sub ebx,ebx notFlagged: and ebx,edx jz testSetLp sub cx,cx jmp bitLp isCoverTest: inc DWORD PTR [esp] mov eax,edx dec eax or edx,eax endTestSet: mov esi,setList sub ecx,ecx lea edi,subSet jmp nextComb finished: pop eax pop esi pop edi ret checkCover endp ; *** calculate how many unique combinations are covered by each set in list rankSets proc STDCALL cover:DWORD,subSet:DWORD,fullSet:DWORD,setList:DWORD LOCAL setAddr:DWORD push edi push esi mov esi,setList sub eax,eax notZero: add eax,4 cmp DWORD PTR [esi+eax],0 jne notZero invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT, eax push eax mov eax,subSet sub edx,edx bts edx,eax dec edx nextCheck: lea edi,subSet mov ebx,edx sub ecx,ecx mov setAddr,ecx bitLp: inc cx mov eax,ebx dec eax and ebx,eax jnz bitLp cmp cx,[edi] bts ecx,16 jge goodCount jc nextSet jmp nextComb goodCount: jnc isCover cmp ebx,setAddr jne notUnique mov setAddr,esi jmp nextSet isCover: jne nextComb lea edi,cover mov esi,setList nextSet: add ebx,[esi] je endList add esi,4 and ebx,edx je nextSet sub cx,cx jmp bitLp endList: add ebx,setAddr je notUnique sub ebx,setList add ebx,[esp] mov esi,ebx inc DWORD PTR [esi-4] notUnique: mov eax,edx dec eax or edx,eax nextComb: inc edx mov eax,fullSet bt edx,eax jnc nextCheck pop eax pop esi pop edi ret rankSets endp ; *** search for the best set to add to a set list bestSet proc STDCALL cover:DWORD,subSet:DWORD,fullSet:DWORD,setList:DWORD LOCAL condition:DWORD LOCAL workList:DWORD LOCAL coverCntr:DWORD LOCAL bestCover:DWORD LOCAL newBestSet:DWORD push edi push esi mov condition,6 sub eax,eax mov bestCover,eax invoke combinations,subSet,fullSet shl eax,4 invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT, eax push eax mov eax,setList mov workList,eax mov eax,cover stageLp: push DWORD PTR [esp] sub edx,edx bts edx,eax dec edx nextCheck: mov ebx,edx lea edi,condition and ecx,20000H jnz bitLp lea edi,subSet bitLp: inc cx mov eax,ebx dec eax and ebx,eax jnz bitLp cmp cx,[edi] bts ecx,16 jge goodCount jc noBits jmp nextComb goodCount: jnc isComb bt ecx,17 jnc isCover ; *** stage two - count a cover for this draw set inc DWORD PTR coverCntr jmp noBits isComb: jne nextComb mov esi,workList noBits: add ebx,[esi] je endSetList add esi,4 sub cx,cx and ebx,edx lea edi,cover jne bitLp jmp noBits endSetList: bt ecx,17 jnc incListAddr mov eax,coverCntr mov coverCntr,ebx cmp eax,bestCover jle isCover mov bestCover,eax mov newBestSet,edx jmp isCover incListAddr: mov esi,[esp] mov [esi],edx add DWORD PTR [esp],4 isCover: mov eax,edx dec eax or edx,eax nextComb: inc edx mov eax,fullSet bt edx,eax jnc nextCheck ; *** move to stage two - find best set of six numbers to cover all uncovered combinations pop eax mov eax,[esp] mov workList,eax sub ebx,ebx mov coverCntr,ebx mov eax,condition bts ecx,17 jnc stageLp pop eax invoke GlobalFree,eax mov eax,newBestSet pop esi pop edi ret bestSet endp ; ########################################################################## End LibMain
  17. Version 1.0.0

    16 downloads

    Ele só é demorado na primeira vez,depois continua de onde parou.
  18. o cologa tem muitas opções mais ainda acho lento ,em questão de reduções acho programa lento
  19. qual linguagem vc conhece,vc ja deve ter usado programa cover de nurmela,eu tenho ele convertido para vb6 em funcionameto que gera reduzido mais tem que ser colocado a quantia de bilhetes,não como o cologa gera e depois reduz,em c tenho o que faz o mesmo que o cologa de gerar e depos ir reduzindo,inclusive eu passei para c++ builder com interface grafica.
×
×
  • Create New...