Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- long long slin[101];
- long long scol[101];
- int main()
- {
- int n;
- cin >> n;
- for(int i=1; i <= n; i++){
- for(int j=1; j <= n; j++){
- int a;
- cin >> a;
- slin[i]+=a;
- scol[j]+=a;
- }
- }
- int cnt=0;
- for(int i=1; i <= n; i++){
- for(int j=1; j <= n; j++){
- if(slin[i]==scol[j])
- cnt++;
- }
- }
- cout << cnt;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement