We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
collections.Counter()
collections.Counter()
Sort by
recency
|
1391 Discussions
|
Please Login in order to post a comment
// writtten by my freind from collections import Counter n = int(input()) ls = list(map(int,input().split())) test = int(input()) ls = Counter(ls) tot=0 for i in range(test): n,m = map(int,input().split()) if(ls[n] > 0): tot+=m
print(tot)
from collections import Counter
def calculate_earnings(shoe_sizes, customers): stock = Counter(shoe_sizes) earnings = 0
if name == 'main': x = int(input()) shoe_sizes = list(map(int, input().split())) n = int(input()) customers = [tuple(map(int, input().split())) for _ in range(n)]