#include <iostream>
#include <cstdio>
#include <stdlib.h>
#include <cstring>
#define ll long long
using namespace std;
const int maxn=5100;
int mp[maxn][maxn];
struct node
{
int i,j;
}ans[maxn];
int n;
int cnt=0;
ll t1[maxn],t2[maxn];
int main ()
{
scanf ("%d",&n);
bool flag=true;
for (int i=1;i<=n;i++)
{
for (int j=1;j<=n;j++)
{
scanf ("%d",&mp[i][j]);
if (mp[i][j])
{
t1[i]+=mp[i][j];
t2[j]+=mp[i][j];
}
if (mp[i][j]==0)
{
ans[++cnt].i=i;
ans[cnt].j=j;
flag=true;
}
}
}
if (!flag)
{
printf ("Bad Game!");
return 0;
}
else
{
ll tot=0;
for (int i=1;i<=cnt;i++)
{
int x=ans[i].i;
int y=ans[i].j;
tot=max(tot,t1[x]+t2[y]);
}
printf ("%lld\n",tot);
return 0;
}
}
我不明白为什么错了?