Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.006 s | 1 KBi |
#2 |
Incorrecto
|
0.006 s | 1 KBi |
#3 |
Incorrecto
|
0.009 s | 1 KBi |
#4 |
Incorrecto
|
0.007 s | 1 KBi |
#5 |
Incorrecto
|
0.007 s | 1 KBi |
#6 |
Incorrecto
|
0.005 s | 2 KBi |
#7 |
Incorrecto
|
0.007 s | 1 KBi |
#8 |
Incorrecto
|
0.008 s | 1 KBi |
#9 |
Incorrecto
|
0.006 s | 1 KBi |
#10 |
Incorrecto
|
0.005 s | 1 KBi |
#11 |
Incorrecto
|
0.004 s | 1 KBi |
#12 |
Incorrecto
|
0.005 s | 1 KBi |
#13 |
Incorrecto
|
0.005 s | 1 KBi |
#14 |
Incorrecto
|
0.004 s | 1 KBi |
#15 |
Incorrecto
|
0.006 s | 1 KBi |
#16 |
Incorrecto
|
0.01 s | 1 KBi |
#17 |
Incorrecto
|
0.006 s | 1 KBi |
#18 |
Incorrecto
|
0.006 s | 1 KBi |
#19 |
Incorrecto
|
0.007 s | 1 KBi |
#20 |
Incorrecto
|
0.007 s | 1 KBi |
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; long long a[n][n]; for(int i = 0; i < n; ++i){ for(int j = 0; j < n; ++j){ cin>>a[i][j]; } } set<int> S; for(int i = 0; i < n; ++i){ long long sum = 0; for(int j = 0; j < n; ++j){ sum += a[i][j]; } S.insert(sum); } for(int j = 0; j < n; ++j){ long long sum = 0; for(int i = 0; i < n; ++i){ sum += a[i][j]; } S.insert(sum); } (int)S.size() == 1 ? cout <<"yes"<<"\n" : cout << "no"<<"\n"; return 0; }