We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
fromitertoolsimportcombinationsdefacmTeam(topic):# Write your code herer=[{i+1fori,jinenumerate(s)ifj=="1"}forsintopic]x=[list(u[0].union(u[1]))foruincombinations(r,r=2)]x=list(map(lambdai:len(i),x))return[max(x),x.count(max(x))]
Cookie support is required to access HackerRank
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 →
python3: