编译没错啊,我试了
by jzy_go @ 2017-07-29 08:49:10
这个题搜索吗?
by 莫德里奇 @ 2017-08-15 08:01:14
```cpp
#include <iostream>
#include <cstdio>
#include <bits/stdc++.h>
#define ll long long
#define LiangJiaJun main
#define z freopen
#define c cin
#define p return
#define m max
#define co cout
using namespace std;
ll a[1001][1001];
ll f[99][99][99][99];
int LiangJiaJun(){
z("pane.in","r",stdin);
z("pane.out","w",stdout);
int n;
c>>n;
int x,y,z;
do{
c>>x>>y>>z;
a[x][y]=z;
}while(x>0&&y>0&&z>0);
for(ll i=1;i<=n;i++){
for(ll j=1;j<=n;j++){
for(ll h=1;h<=n;h++){
for(ll k=1;k<=n;k++){
f[i][j][h][k]=m(m(f[i-1][j][h-1][k],f[i][j-1][h][k-1]),m(f[i-1][j][h][k-1],f[i][j-1][h-1][k]))+a[i][j];
if(i!=h&&j!=k){
f[i][j][h][k]+=a[h][k];
}
}
}
}
}
co<<f[n][n][n][n];
p 0;
}
我也是re,noi openjudge 都a了
```
by zzbzzbzzb @ 2017-08-22 15:47:17