QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#155446#7120. Soccerzhouhuanyi#0 1ms4064kbC++141.8kb2023-09-01 17:06:082023-09-01 17:06:08

Judging History

你现在查看的是测评时间为 2023-09-01 17:06:08 的历史记录

  • [2024-04-28 06:42:25]
  • 管理员手动重测本题所有提交记录
  • 测评结果:0
  • 用时:0ms
  • 内存:4120kb
  • [2023-09-01 17:06:08]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:4064kb
  • [2023-09-01 17:06:08]
  • 提交

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;
}

詳細信息

Subtask #1:

score: 0
Runtime Error

Test #1:

score: 6
Accepted
time: 1ms
memory: 3808kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
1
0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
1

result:

ok ok

Test #2:

score: 6
Accepted
time: 1ms
memory: 3808kb

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: 4012kb

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: 1ms
memory: 3768kb

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: 1ms
memory: 3788kb

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: 1ms
memory: 4064kb

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%