QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#317388#7120. SoccerRandom_Code#0 456ms10884kbC++171.8kb2024-01-28 22:14:252024-04-28 08:34:21

Judging History

你现在查看的是最新测评结果

  • [2024-04-28 08:34:21]
  • 管理员手动重测本题所有提交记录
  • 测评结果:0
  • 用时:456ms
  • 内存:10884kb
  • [2024-01-28 22:14:25]
  • 评测
  • 测评结果:0
  • 用时:453ms
  • 内存:10100kb
  • [2024-01-28 22:14:25]
  • 提交

answer

//ANMHLIJKTJIY!
#pragma GCC optimize(2)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
#pragma GCC diagnostic error "-fwhole-program"
#pragma GCC diagnostic error "-fcse-skip-blocks"
#pragma GCC diagnostic error "-funsafe-loop-optimizations"
#include "soccer.h"
#include <bits/stdc++.h>
#define INF 1000000000
#define LINF 1000000000000000000
#define MOD 1000000007
#define mod 998244353
#define F first
#define S second
#define ll int
#define N 510
using namespace std;
ll n,a[N][N],f[2][N][N][2],mx[N][N];
int biggest_stadium(int _n,vector<vector<int> > grid)
{
	ll i,j,k,ans=0;
	n=_n;
	for(i=0;i<n;i++)
	{
		for(j=0;j<n;j++)
		{
			a[i][j]=grid[i][j];
		}
	}
	memset(f[0],-63,sizeof(f[0]));
	for(i=0;i<n;i++)
	{
		ll u=i&1,v=u^1;
		for(j=0;j<n;j++)
		{
			for(k=j;k<n;k++)
			{
				f[v][j][k][0]=0;
				f[v][j][k][1]=0;
			}
		}
		for(j=0;j<n;j++)
		{
			f[v][j][j][0]=max(f[u][j][j][0],0);
		}
		for(j=2;j<=n;j++)
		{
			for(k=0;k+j-1<n;k++)
			{
				f[v][k][k+j-1][0]=max(f[u][k][k+j-1][0],max(f[v][k][k+j-2][0],f[v][k+1][k+j-1][0]));
			}
		}
		f[v][0][n-1][1]=max(max(f[u][0][n-1][0],f[u][0][n-1][1]),0);
		for(j=n-1;j>=1;j--)
		{
			for(k=0;k+j-1<n;k++)
			{
				ll val=max(f[u][k][k+j-1][0],f[u][k][k+j-1][1]);
				f[v][k][k+j-1][1]=max(val,max((k+j==n?0:f[v][k][k+j][1]),(k==0?0:f[v][k-1][k+j-1][1])));
			}
		}
		for(j=0;j<n;j++)
		{
			for(k=j;k<n;k++)
			{
				f[v][j][k][0]+=k-j+1;
				f[v][j][k][1]+=k-j+1;
			}
		}
		for(j=0;j<n;j++)
		{
			bool hv=false;
			for(k=j;k<n;k++)
			{
				if(a[i][k])
				{
					hv=true;
				}
				if(hv)
				{
					f[v][j][k][0]=f[v][j][k][1]=-INF;
				}
				else
				{
					ans=max(ans,f[v][j][k][0]);
					ans=max(ans,f[v][j][k][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: 1ms
memory: 7944kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
1
0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
1

result:

ok ok

Test #2:

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

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 1 0
0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
5

result:

ok ok

Test #3:

score: 6
Accepted
time: 0ms
memory: 8264kb

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:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
9850

result:

ok ok

Test #4:

score: 6
Accepted
time: 456ms
memory: 10884kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
500
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:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
236536

result:

ok ok

Test #5:

score: 0
Runtime Error

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
2000
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: 7984kb

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: 2ms
memory: 8584kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 1 1
0 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
5

result:

ok ok

Test #12:

score: 0
Wrong Answer
time: 1ms
memory: 8068kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 1
0 0 0
1 1 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
6

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%