QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#319573 | #7120. Soccer | lgvc | Compile Error | / | / | C++14 | 1.1kb | 2024-02-02 20:45:04 | 2024-04-28 08:36:38 |
Judging History
你现在查看的是最新测评结果
- [2024-04-28 08:36:38]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-02-02 20:45:05]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-02-02 20:45:04]
- 提交
answer
#include "soccer.h"
#include <bits/stdc++.h>
int dp[509][509][509],dp2[509][509][509];
int biggest_stadium(int N, std::vector<std::vector<int>> F) {
memset(dp,-0x3f,sizeof(dp));
for(int i=1;i<=N;i++) {
int ll=N+1;
for(int j=N;j>=1;j--) {
if(F[i-1][j-1]) ll=j;
la[i][j]=ll;
}
}
for(int i=1;i<=N;i++) {
for(int j=1;j<=N;j++) {
if(F[i-1][j-1]) continue;
dp[i][i][j]=la[i][j]-1;
dp2[i][i][j]=la[i][j]-j;
}
}
int as=0;
for(int l=1;l<=N;l++) {
for(int i=1;i+l-1<=N;i++) {
int j=i+l-1;
for(int k=1;k<=N;k++) {
as=std::max(as,dp2[i][j][k]);
if(dp2[i][j][k]<0) continue;
int x=dp[i][j][k];
for(int l=k;l<=x;l++) {
int z1=0,z2=0;
if(i!=1&&F[i-2][l-1]==0) {
dp[i-1][j][l]=std::max(dp[i-1][j][l],std::min(x,la[i-1][l]-1));
dp2[i-1][j][l]=std::max(dp2[i-1][j][l],dp2[i][j][k]+std::min(x,la[i-1][l]-1)-l+1);
}
if(j!=N&&F[j][l-1]==0) {
dp[i][j+1][l]=std::max(dp[i][j+1][l],std::min(x,la[j+1][l]-1));
dp2[i][j+1][l]=std::max(dp2[i][j+1][l],dp2[i][j][k]+std::min(x,la[ij+1][l]-1)-l+1);
}
}
}
}
}
return as;
}
详细
answer.code: In function ‘int biggest_stadium(int, std::vector<std::vector<int> >)’: answer.code:10:25: error: ‘la’ was not declared in this scope; did you mean ‘ll’? 10 | la[i][j]=ll; | ^~ | ll answer.code:16:37: error: ‘la’ was not declared in this scope 16 | dp[i][i][j]=la[i][j]-1; | ^~ answer.code:31:97: error: ‘la’ was not declared in this scope; did you mean ‘l’? 31 | dp[i-1][j][l]=std::max(dp[i-1][j][l],std::min(x,la[i-1][l]-1)); | ^~ | l answer.code:35:97: error: ‘la’ was not declared in this scope; did you mean ‘l’? 35 | dp[i][j+1][l]=std::max(dp[i][j+1][l],std::min(x,la[j+1][l]-1)); | ^~ | l answer.code:36:115: error: ‘ij’ was not declared in this scope; did you mean ‘j’? 36 | dp2[i][j+1][l]=std::max(dp2[i][j+1][l],dp2[i][j][k]+std::min(x,la[ij+1][l]-1)-l+1); | ^~ | j