You are viewing a single comment's thread. Return to all comments →
Just 5 lines
from itertools import combinations n,k = map(int,input().split()) teams = [list(map(int,list(input()))) for i in range(n)] sums = [sum([x[0] or x[1] for x in list(zip(*i))]) for i in combinations(teams,2)] print(max(sums),sums.count(max(sums)),sep='\n')
Please vote and comment if you liked it...
Seems like cookies are disabled on this browser, please enable them to open this website
ACM ICPC Team
You are viewing a single comment's thread. Return to all comments →
Shortest Solution in Python -:
Just 5 lines
Please vote and comment if you liked it...