No Idea!

Sort by

recency

|

1468 Discussions

|

  • + 0 comments
    # Enter your code here. Read input from STDIN. Print output to STDOUT
    import collections
    if __name__ == '__main__':
        contain = list(map(int, input().split(' ')))
        alist = list(map(str, input().split(' ')))
        a = set(map(str, input().split(' ')))
        b = set(map(str, input().split(' ')))
        fs = collections.Counter(alist)
        ha = 0
        hb = 0
        for c in a:
            if c in fs.keys():
                ha = ha+ int(fs[c])
        for c in b:
            if c in fs.keys():
                hb = hb + int(fs[c])
        print(ha-hb)
    
  • + 0 comments
    n_of_array, m_of_sets = map(int, input().split())
    
    elements_of_array = list(map(int, input().split()))
    
    setA = set(map(int, input().split()))
    setB = set(map(int, input().split()))
    
    happiness = 0
    
    for i in elements_of_array:
        if i in setA:
            happiness += 1
        elif i in setB:
            happiness -= 1
            
    print(happiness)
    
  • + 0 comments

    n, m = map(int, input().split()) narr = list(map(int, input().split())) A = set(map(int, input().split())) B = set(map(int, input().split())) happiness = 0 for i in narr: if i in A: happiness += 1 elif i in B: happiness -= 1 else: happiness = happiness print(happiness)

  • + 0 comments
    dims = list(map(int, input().split()))
    
    whole = list(map(int, input().split()))
    
    a = set(map(int, input().split()))
    
    b = set(map(int, input().split()))
    
    happy = 0
    
    for i in whole:
        if i in a:
            happy +=1
        if i in b:
            happy -=1
    
    print(happy)
    
  • + 0 comments

    n,m = map(int,input().split())

    a = list(map(int,input().split()))

    A = set(map(int,input().split()))

    B = set(map(int,input().split()))

    happiness=0

    for i in a:

    if(i in A):
    
        happiness+=1
    elif(i in B):
        happiness-=1
    

    print(happiness)