2020-08-01 06:27:42 +00:00
|
|
|
// https://www.luogu.com.cn/record/36172239
|
|
|
|
|
|
|
|
#include <bits/stdc++.h>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
int n, win[7], lottery[7], sum[10], c;
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
cin >> n;
|
2021-11-19 09:01:13 +00:00
|
|
|
for (int i = 0; i < 7; i++) {
|
2020-08-01 06:27:42 +00:00
|
|
|
cin >> win[i];
|
|
|
|
}
|
2021-11-19 09:01:13 +00:00
|
|
|
for (int i = 0; i < n; i++) {
|
2020-08-01 06:27:42 +00:00
|
|
|
c = 0;
|
2021-11-19 09:01:13 +00:00
|
|
|
for (int j = 0; j < 7; j++) {
|
2020-08-01 06:27:42 +00:00
|
|
|
cin >> lottery[j];
|
2021-11-19 09:01:13 +00:00
|
|
|
for (int p = 0; p < 7; p++) {
|
|
|
|
if (lottery[j] == win[p]) c++;
|
2020-08-01 06:27:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// cout << c << ' '; // debug
|
|
|
|
sum[c]++;
|
|
|
|
}
|
|
|
|
// cout << endl; // debug
|
2021-11-19 09:01:13 +00:00
|
|
|
for (int i = 7; i > 0; i--) {
|
2020-08-01 06:27:42 +00:00
|
|
|
cout << sum[i] << ' ';
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|