You are viewing a single comment's thread. Return to all comments →
I had exactly the same problem; your biggest issues are
1) running int() twice for EVERY possible combination of strings (you should do that once per string, when you generate guyslist[]), and
2) running an extra for loop to count the individual bits (you should use bitwise OR operation, and then use str.count())
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 →
I had exactly the same problem; your biggest issues are
1) running int() twice for EVERY possible combination of strings (you should do that once per string, when you generate guyslist[]), and
2) running an extra for loop to count the individual bits (you should use bitwise OR operation, and then use str.count())