Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int n,m,a[1001][1001],i,j,kil[1001],kil2[1001],s;
- int main()
- {cin.tie(0);
- ios_base::sync_with_stdio(false);
- cin>>n>>m;
- for (int x=1;x<=n;x++) for (int y=1;y<=m;y++) {cin>>a[x][y];kil[x]+=a[x][y];kil2[y]+=a[x][y];}
- for (int i=1;i<=n;i++) for (int j=1;j<=m;j++) s+=((kil[i]+kil2[j]+a[i][j])&1);
- cout<<s<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement