Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ACM ICPC 2014 Team
def check_match2(person1, person2):
return bin(int('0b'+person1,2) | int('0b'+person2,2)).count('1')
def make_combos2(people):
plist = []; plist.append(input())
count = 0
maximum = 0
for i in range(people-1):
person = input()
plist.append(person)
for person0 in plist:
ck = check_match2(person0, person)
if ck > maximum:
maximum = ck
count = 1
elif ck == maximum:
count+=1
return [maximum, count]
if __name__ == '__main__':
people, topics = input().split()
print("{}\n{}".format(*make_combos2(int(people))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.