You are viewing a single comment's thread. Return to all comments →
You've overcomplicated things.
for _ in range(input()):
print "YES" if len(set(raw_input())&set(raw_input())) else "NO"
Seems like cookies are disabled on this browser, please enable them to open this website
Two Strings
You are viewing a single comment's thread. Return to all comments →
You've overcomplicated things.
for _ in range(input()):