mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 18:56:28 +00:00
P2550 [AHOI2001]彩票摇奖
R36172239
This commit is contained in:
parent
4caca6f202
commit
45c391d79d
31
problem/P2550/P2550.cpp
Normal file
31
problem/P2550/P2550.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
// 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;
|
||||
for(int i = 0 ; i < 7 ; i++) {
|
||||
cin >> win[i];
|
||||
}
|
||||
for(int i = 0 ; i < n ; i++) {
|
||||
c = 0;
|
||||
for(int j = 0 ; j < 7 ; j++) {
|
||||
cin >> lottery[j];
|
||||
for(int p = 0 ; p < 7 ; p++) {
|
||||
if(lottery[j] == win[p]) c++;
|
||||
}
|
||||
}
|
||||
// cout << c << ' '; // debug
|
||||
sum[c]++;
|
||||
}
|
||||
// cout << endl; // debug
|
||||
for(int i = 7 ; i > 0 ; i--) {
|
||||
cout << sum[i] << ' ';
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user