0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-25 07:31:59 +00:00
OI-codes/Luogu/P8254/P8254.cpp

31 lines
484 B
C++

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