This file contains 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
memoize_case_max_payoff = {} | |
def find_max_entropy_case(n: int): | |
if n % 2 == 0: | |
return n//2 | |
else: | |
return n//2 + 1 | |
def solve_case(n: int, majority: int): | |
# we already saw this case! |
This file contains 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
# this is a guy who can have collateral, yes tokens, and no tokens for a pool. | |
class Guy: | |
def __init__(self, collateral): | |
self.collateral = collateral | |
self.yes_tokens = 0 | |
self.no_tokens = 0 | |
# create a pool type | |
class Pool: |