if __name__ == '__main__':
n, m = input().split(" ")
score = input().split(" ")
answer = input().split(" ")
res = []
for i in range(int(n)):
student = input().split(" ")
r = 0
for j in range(int(m)):
if student[j] == answer[j]:
r += int(score[j])
res.append(r)
for i in range(int(n)):
print(res[i])
PAT (Basic Level) Practice (中文)1061 判断题
最新推荐文章于 2024-08-23 11:46:54 发布