You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
530 B

#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;
}