Advertisement
Pridexs

Regional_Curitiba_Problema_H

Sep 17th, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <cstdlib>
  4. #include <cstring>
  5. #include <cctype>
  6. #include <cmath>
  7. #include <algorithm>
  8. #include <bitset>
  9. #include <vector>
  10. #include <stack>
  11. #include <queue>
  12. #include <set>
  13. #include <map>
  14.  
  15. /*
  16. Team: BalΓ£o Vermelho
  17. */
  18.  
  19. int main() {
  20.     int n, m, cont, x;
  21.     bool todos_jogos;
  22.     while(scanf("%d %d", &n, &m) != EOF) {
  23.         cont = 0;
  24.         for(int i = 0; i < n; i++) {
  25.             todos_jogos = true;
  26.             for(int j = 0; j < m; j++) {
  27.                 scanf("%d", &x);
  28.                 if (x == 0)
  29.                     todos_jogos = false;
  30.             }
  31.             if(todos_jogos)
  32.                 cont++;
  33.             todos_jogos = true;
  34.         }
  35.         printf("%d\n", cont);
  36.     }
  37.     return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement