Advertisement
AmidamaruZXC

TaskI

Apr 24th, 2021
727
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n, m, k = 0, res = 0;
  8.     cin >> n >> m;
  9.     int** matr;
  10.     matr = new int* [n];
  11.     for (int i = 0; i < n; i++)
  12.     {
  13.         matr[i] = new int[m];
  14.         for (int j = 0; j < m; j++)
  15.         {
  16.             cin >> matr[i][j];
  17.             if (matr[i][j] == 0)
  18.                 k++;
  19.         }
  20.         if (k == m)
  21.             res++;
  22.         k = 0;
  23.     }
  24.     cout << res;
  25. }
  26.  
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement