mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-27 06:12:00 +00:00
31 lines
484 B
C++
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;
|
||
|
}
|