No Idea!

Sort by

recency

|

1511 Discussions

|

  • + 0 comments

    This is the stupidest website I have ever visited. The main challenge with this 'medium' problem was figuring out the ABSURD way inputs are given!

    n is an array OH BUT ACTUALLY IT'S A STRING.

    Useless waste of time.

  • + 0 comments
    n, m = map(int, input().split())
    
    nElements = list(map(int, input().split()))
    A = set(map(int, input().split()))
    B = set(map(int, input().split()))
    
    happiness = 0
    
    for item in nElements:
        if item in A:
            happiness += 1
        elif item in B:
            happiness -= 1
    
    print(happiness)
    
  • + 0 comments

    n, m = input().split(" ") arr = [int(i) for i in input().split(" ")] a = set([int(i) for i in input().split(" ")]) b = set([int(i) for i in input().split(" ")])

    sums = [] for i in arr: if i in a: sums.append(1) elif i in b: sums.append(-1) print(sum(sums))

  • + 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)