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
#!/bin/python3 | |
# Chris Grundy McKinnon method | |
import sys | |
from functools import reduce | |
g = int(input().strip()) | |
for a0 in range(g): | |
n = int(input().strip()) # num of heaps | |
p = [int(p_temp) for p_temp in input().strip().split(' ')] # pile counts |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
def random_analogies(): | |
while(1): | |
r = lambda: random.randint(0,len(embeddings)-1) | |
x = list(embeddings.keys())[r()] | |
y = list(embeddings.keys())[r()] | |
z = list(embeddings.keys())[r()] | |
restart = False | |
for w in [x, y, z]: | |
if not w.isalpha(): | |
restart = True |