Adjust weight function
This commit is contained in:
parent
71dbd4904d
commit
1bca3da2e7
|
@ -5,7 +5,6 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/bits"
|
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -56,7 +55,7 @@ func main() {
|
||||||
fmt.Println(val)
|
fmt.Println(val)
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = db.Exec("INSERT INTO cards VALUES(?, ?, ?, ?)", i, 1<<(bits.LeadingZeros(uint(i))-40), key, val)
|
_, err = db.Exec("INSERT INTO cards VALUES(?, ?, ?, ?)", i, 1<<(30-i/50), key, val)
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue