mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
e56ca966bc
1400-1499
65 lines
1.5 KiB
C++
65 lines
1.5 KiB
C++
#include <cstdlib>
|
|
#include <cctype>
|
|
#include <cstring>
|
|
#include <cstdio>
|
|
#include <cmath>
|
|
#include <algorithm>
|
|
#include <vector>
|
|
#include <string>
|
|
#include <iostream>
|
|
#include <sstream>
|
|
#include <map>
|
|
#include <set>
|
|
#include <queue>
|
|
#include <stack>
|
|
#include <fstream>
|
|
#include <numeric>
|
|
#include <iomanip>
|
|
#include <bitset>
|
|
#include <list>
|
|
#include <stdexcept>
|
|
#include <functional>
|
|
#include <utility>
|
|
#include <ctime>
|
|
using namespace std;
|
|
typedef long long LL;
|
|
typedef unsigned long long ULL;
|
|
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
#define MEM(a,b) memset((a),(b),sizeof(a))
|
|
const LL INF = 1000000007;
|
|
const int N = 1e3+10;
|
|
const double eps = 1e-12;
|
|
int a[N][N];
|
|
int main()
|
|
{
|
|
int n;
|
|
while (scanf("%d", &n) != EOF)
|
|
{
|
|
if (n == 0) break;
|
|
int flag = 1;
|
|
for (int i = 0; i < n; i++)
|
|
{
|
|
for (int j = 0; j < n; j++)
|
|
{
|
|
scanf("%d", &a[i][j]);
|
|
}
|
|
}
|
|
for (int i = 0; i < n; i++)
|
|
{
|
|
for (int j = i + 1; j < n; j++)
|
|
{
|
|
if (a[i][i] + a[j][j] != a[i][j] + a[j][i])
|
|
{
|
|
flag = 0;
|
|
break;
|
|
}
|
|
}
|
|
if (flag == 0) break;
|
|
}
|
|
if (flag) puts("homogeneous");
|
|
else puts("not homogeneous");
|
|
}
|
|
return 0;
|
|
}
|