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.

27 lines
494 B

2 years ago
#include <bits/stdc++.h>
using namespace std;
int n;
int c[34];
int d[8];
int main() {
scanf("%d", &n);
for (int i = 1; i <= 7; i++) {
int x;
scanf("%d", &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;
}