Good base DP
First, two three-dimensional arrays are established, and a point weight of map[i][j][k]=sum as coordinates (I,J,K) is sum,
Another array initial value is 0,DP transfer equation: F[i][j][k]:=max (f[i-1][j][k],f[i][j-1][k],f[i][j][k-1]);
Code
varF,map:Array[0..101,0..101,0..101] ofLongint; I,j,k,l,m,n,x,y,z,sum:longint; functionMax (a,b,c:longint): Longint; beginmax:=-Maxlongint; ifA>max Thenmax:=A; ifB>max Thenmax:=b; ifC>max Thenmax:=C; End; beginreadln (x, y, z); READLN (m); fori:=1 toM Doreadln (J,k,l,map[j][k][l]); fori:=1 toX Do forj:=1 toY Do fork:=1 toZ DoF[i][j][k]:=max (f[i-1][j][k],f[i][j-1][k],f[i][j][k-1])+Map[i][j][k]; READLN (sum); ifF[x][y][z]>=sum ThenWriteln (F[x][y][z])ElseWriteln ('bigbang!'); End.
Like on the collection, Vic private qq:1064864324, add me to discuss issues together, and progress
[CODEVS3323] Space-time jumper's blockade