Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main() {
- int c = 0;
- int a;
- std::cin>>a;
- int map[a][a];
- for (int x = 0; x < a; x++)
- for (int y = 0; y < a; y++) {
- std::cin>>map[x][y];
- if (map[x][y]) c++;
- }
- std::cout<<c;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement