You are viewing a single comment's thread. Return to all comments →
Here's mine in Python.
import collections values = collections.defaultdict(int) for _ in range(int(input())): values[input()] += 1 for _ in range(int(input())): print(values[input()])
Seems like cookies are disabled on this browser, please enable them to open this website
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
Here's mine in Python.