1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| #include<iostream> using namespace std; const int maxn = 1009; int n, m, t, ans[maxn], cnt = 0; int main(){ scanf("%d%d", &n, &m); for(int i = 1; i <= m; i++){ for(int j = 1; j <= n; j++){ scanf("%d", &t); ans[j] += t; } } for(int i = 1; i <= n; i++){ scanf("%d", &t); ans[i] *= 2;
if((t && (ans[i] > m)) || (!t && (ans[i] < m))){ cnt++; } } printf("%d", cnt); return 0; }
|