题解 | 生词篇章查询
生词篇章查询
https://www.nowcoder.com/practice/3790042b79114ae5bd9f6eccdaeadfcd
N = int(input())
S = {}
for i in range(N):
line = input().split()
S[i] = line[1:] # 存文档
w = {}
M = int(input())
for i in range(M):
res = []
w[i] = input() # 存单词
for j in range(len(S)):
if w[i] in S[j]:
res.append(j + 1) # 存文档编号
print(" ".join(map(str, res)))


