You are viewing a single comment's thread. Return to all comments →
from collections import defaultdict n, m = input().split() a = defaultdict(list) [a[input()].append(i+1) for i in range(int(n))] [print(*a[input()] or [-1]) for i in range(int(m))]
Seems like cookies are disabled on this browser, please enable them to open this website
DefaultDict Tutorial
You are viewing a single comment's thread. Return to all comments →