mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-08 12:58:48 +00:00
P8254 [NOI Online 2022 普及组] 王国比赛(民间数据)
R72448073
This commit is contained in:
parent
535a44eefa
commit
e8604b8c2c
30
Luogu/P8254/P8254.cpp
Normal file
30
Luogu/P8254/P8254.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
#include <iostream>
|
||||
|
||||
using std::cin;
|
||||
using std::cout;
|
||||
const char endl = '\n';
|
||||
|
||||
const int N = 1005;
|
||||
|
||||
int n, m, a[N], ans;
|
||||
|
||||
int main() {
|
||||
std::ios::sync_with_stdio(false);
|
||||
|
||||
cin >> n >> m;
|
||||
for (int i = 1; i <= m; i++) {
|
||||
for (int j = 1, x; j <= n; j++) {
|
||||
cin >> x;
|
||||
if (x) a[j]++;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 1, x; i <= n; i++) {
|
||||
cin >> x;
|
||||
if (x == (a[i] > m - a[i])) ans++;
|
||||
}
|
||||
|
||||
cout << ans << endl;
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user