This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <set> | |
#include <string> | |
#include <algorithm> | |
#include <ctime> | |
#include <fstream> | |
#include <cmath> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
from decimal import * | |
import random | |
import time | |
getcontext().prec = 100 | |
# convert to big decimal | |
def lf(num): | |
return Decimal(num) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
from decimal import * | |
import random | |
import time | |
# getcontext().prec = 50 | |
# convert to big decimal | |
def lf(num): | |
return Decimal(num) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
from decimal import * | |
import random | |
import time | |
getcontext().prec = 100 | |
# convert to big decimal | |
def lf(num): | |
return Decimal(num) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
import math | |
import bigfloat | |
import time | |
class Pintrust: | |
# parameter | |
target_user = 5332 # 5332 | |
alpha = 1e-2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <string> | |
#include <algorithm> | |
#include <ctime> | |
#include <fstream> | |
#include <cmath> | |
#include <functional> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
import math | |
import bigfloat | |
import time | |
class Pintrust: | |
# parameter | |
target_user = 0 # 5332 | |
alpha = 1e-2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
import math | |
import time | |
class Pintrust: | |
# parameter | |
target_user = 5332 # 5332 | |
alpha = 1e-2 | |
beta = 1e-5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
import math | |
import time | |
class Pintrust: | |
# parameter | |
target_user = 5332 # 5332 | |
alpha = 1e-2 | |
beta = 1e-5 | |
eps = 0.005 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
import math | |
import bigfloat | |
import time | |
prc = 100 | |
# set big float precision | |
bigfloat.setcontext(bigfloat.precision(prc)) | |
# convert to big float |