You are viewing a single comment's thread. Return to all comments →
this is basically the same solution I came up with but still getting an error(p.s I know I could be more efficient)
ch = list(map(int, input().split())) arr = list(map(int, input().split())) A = set(map(int, input().split())) B = set(map(int, input().split())) happiness = 0 for i in arr: count = 0 if i in A: count +=1 happiness = happiness + count elif i in B: count -=1 happiness = happiness + count else: count=0 return (happiness)
Seems like cookies are disabled on this browser, please enable them to open this website
No Idea!
You are viewing a single comment's thread. Return to all comments →
this is basically the same solution I came up with but still getting an error(p.s I know I could be more efficient)