QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#155446 | #7120. Soccer | zhouhuanyi# | 0 | 0ms | 4120kb | C++14 | 1.8kb | 2023-09-01 17:06:08 | 2024-04-28 06:42:25 |
Judging History
answer
#include"soccer.h"
#include<iostream>
#include<cstdio>
#define N 30
using namespace std;
const int inf=(int)(1e9);
int n,DP[N+1][N+1][2][2],dp[N+1][N+1][N+1][2][2];
int biggest_stadium(int SN,vector<vector<int>>F)
{
bool op;
int ans=0;
n=SN;
for (int s=1;s<=n;++s)
{
for (int i=1;i<=n;++i)
{
for (int j=1;j<=n;++j)
for (int k=j;k<=n;++k)
for (int op=0;op<=1;++op)
for (int op2=0;op2<=1;++op2)
dp[i][j][k][op][op2]=DP[j][k][op][op2]=-inf;
if (i!=1)
{
for (int j=1;j<=n;++j)
for (int k=j;k<=n;++k)
for (int op=0;op<=1;++op)
for (int op2=0;op2<=1;++op2)
for (int opt=op;opt<=1;++opt)
for (int opt2=op2;opt2<=1;++opt2)
DP[j][k][opt][opt2]=max(DP[j][k][opt][opt2],dp[i-1][j][k][op][op2]);
for (int j=1;j<=n;++j)
for (int k=n;k>=j;--k)
for (int op=0;op<=1;++op)
for (int op2=0;op2<=1;++op2)
{
if (k+1<=n&&op2) DP[j][k][op][op2]=max(DP[j][k][op][op2],DP[j][k+1][op][op2]);
if (j-1>=1&&op) DP[j][k][op][op2]=max(DP[j][k][op][op2],DP[j-1][k][op][op2]);
}
for (int j=n;j>=1;--j)
for (int k=j+1;k<=n;++k)
for (int op=0;op<=1;++op)
for (int op2=0;op2<=1;++op2)
{
if (!op2) DP[j][k][op][op2]=max(DP[j][k][op][op2],DP[j][k-1][op][op2]);
if (!op) DP[j][k][op][op2]=max(DP[j][k][op][op2],DP[j+1][k][op][op2]);
}
}
for (int j=1;j<=n;++j)
{
op=1;
for (int k=j;k<=n;++k)
{
op&=(!F[i-1][k-1]);
if (j<=s&&s<=k&&op)
{
for (int op=0;op<=1;++op)
for (int op2=0;op2<=1;++op2)
dp[i][j][k][op][op2]=DP[j][k][op][op2]+k-j+1,ans=max(ans,dp[i][j][k][op][op2]);
dp[i][j][k][0][0]=max(dp[i][j][k][0][0],k-j+1),ans=max(ans,k-j+1);
}
}
}
}
}
return ans;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Runtime Error
Test #1:
score: 6
Accepted
time: 0ms
memory: 3752kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 1 0
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 1
result:
ok ok
Test #2:
score: 6
Accepted
time: 0ms
memory: 4120kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 3 0 0 0 0 1 0 0 0 0
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 5
result:
ok ok
Test #3:
score: 0
Runtime Error
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
result:
Subtask #2:
score: 0
Wrong Answer
Test #10:
score: 8
Accepted
time: 0ms
memory: 3748kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 3 0 0 0 0 1 0 0 1 1
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 5
result:
ok ok
Test #11:
score: 8
Accepted
time: 0ms
memory: 3816kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 3 0 0 0 0 1 1 0 0 1
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 5
result:
ok ok
Test #12:
score: 8
Accepted
time: 0ms
memory: 3836kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 3 0 0 1 0 0 0 1 1 0
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 5
result:
ok ok
Test #13:
score: 0
Wrong Answer
time: 0ms
memory: 3828kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 3 1 0 0 1 0 1 0 0 1
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 5
result:
wrong answer wrong
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 0
Skipped
Dependency #4:
0%
Subtask #6:
score: 0
Skipped
Dependency #1:
0%