@[LG233666](/user/1159940) 采用count
```python
n=int(input())
x=set(map(int,input().split()))
cnt=[sum(1 for i in input().split() if int(i) in x) for _ in range(n)]
print(*(cnt.count(i) for i in range(7,0,-1)))
```
by hyh0174 @ 2024-03-15 21:46:34
@[hyh0174](/user/439949) 帅,大佬
by LG233666 @ 2024-03-15 22:49:05