7-1点赞狂
1 #include <iostream> 2 using namespace std; 3 int main(){ 4 int t, n, m, x, tmp = 0;; 5 cin >> t; 6 while (t--){ 7 cin >> n >> m; 8 for (int i = 0; i < n; i++){ 9 int cnt = 0; 10 for (int j = 0; j < m; j++){ 11 cin >> x; 12 if (x == 1) 13 cnt++; 14 } 15 if (cnt > m / 2) 16 tmp++; 17 } 18 } 19 cout << tmp << endl; 20 return 0; 21 }