Skip to content

Instantly share code, notes, and snippets.

@Ffisegydd
Created December 3, 2016 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ffisegydd/d80fa726a05bdfbe1f61f51314a2e998 to your computer and use it in GitHub Desktop.
Save Ffisegydd/d80fa726a05bdfbe1f61f51314a2e998 to your computer and use it in GitHub Desktop.
import numpy as np
from itertools import combinations
with open('data/3.txt') as f:
print(sum(all(sum(com)/sum(d) > 0.5 for com in combinations(d, 2)) for d in np.array([tuple(int(n) for n in l.strip().split()) for l in f]).T.reshape((1734, -1))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment