You are viewing a single comment's thread. Return to all comments →
lengths = input().split() target_lst = [] seek_lst = [] for n in range(int(lengths[0])): target_lst.append(input()) for n in range(int(lengths[1])): seek_lst.append(input()) for n in seek_lst: target_index = [] if n in target_lst: for c,x in enumerate(target_lst): if x==n: target_index.append(str(c+1)) print(' '.join(target_index)) else: print("-1")
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 →