Files
python/TangDou/LuoGuBook/P2550.cpp

26 lines
530 B
C++
Raw Normal View History

2025-08-30 18:35:01 +08:00
#include <bits/stdc++.h>
using namespace std;
int n;
int c[34];// c[2]=1 c[3]=1 c[4]=1 c[5]=1 c[6]=1 c[7]=1 c[9]=1
int d[8];
int main() {
cin >> n;
for (int i = 1; i <= 7; i++) {
int x;
cin >> x;
c[x] = 1;
}
while (n--) {
int cnt = 0;
for (int i = 1; i <= 7; i++) {
int x;
cin >> x;
if (c[x]) cnt++;
}
d[7 - cnt + 1]++;
}
for (int i = 1; i <= 7; i++) printf("%d ", d[i]);
return 0;
}