No Idea!

Sort by

recency

|

1508 Discussions

|

  • + 0 comments
    from functools import reduce
    
    n, m = map(int, input().split())
    array = map(int, input().split())
    a = set(map(int, input().split()))
    b = set(map(int, input().split()))
    
    print(reduce(
        lambda x, y: (x + 1) if y in a else x - 1 if y in b else x,
        array,
        0
        ))
    
  • + 0 comments
    n, m= input().split()
    arr= input().split()
    A= set(input().split())
    B= set(input().split())
    
    Score_A= len([element for element in arr if element in A])
    Score_B= len([element for element in arr if element in B])
    
    total_happiness= Score_A - Score_B
    print(total_happiness)
    
  • + 0 comments

    n,m = input().split() n_arr = input().split() a = set(input().split()) b = set(input().split())

    def happiness(): h =0 for i in n_arr: if i in a: h+=1 elif i in b: h-=1 else: h=h return h print(happiness())

  • + 0 comments

    N,M=map(int,input().split()) l=list(map(int,input().split())) s1=set(map(int,input().split())) s2=set(map(int,input().split())) hapiness=0 for i in l: if i in s1: hapiness += 1 elif i in s2: hapiness -= 1

    print(hapiness)

  • + 0 comments

    n,m = map(int, input().split()) list1 = list(map(int, input().split())) set1 = set(map(int, input().split())) set2 = set(map(int, input().split())) happ = 0

    happ = sum((i in set1) - (i in set2) for i in list1)

    print(happ)